T
T
teenczm2021-02-14 23:24:20
bash
teenczm, 2021-02-14 23:24:20

Why not valid name when using zip?

There is a file fio.txt with a list:

Ivanov Ivan Ivanovich
Sergeev Sergey Sergeevich
Alekseev Alexey Alekseevich

There is a folder with share files (the .docx file was unpacked here)
you need to create three archives with names from the fio.txt file
I do this:

#!/bin/bash

while read line ; do
cd /etc/samba/share
zip -r "$line".docx *
done < /etc/samba/fio.txt

It turns out:
6029862a10d4a682491143.jpeg

What should happen:
Ivanov Ivan Ivanovich.docx
Sergeev Sergey Sergeevich.docx
Alekseev Alexey Alekseevich.docx

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question