T
T
teenczm2021-02-14 17:40:32
bash
teenczm, 2021-02-14 17:40:32

Why isn't the entire line assigned to a variable in a While read loop?

There is a file fio.txt with the content
Ivanov Ivan Ivanovich
Alekseev Aleksey Alekseevich
Yuryev Yury Yuryevich

I need to make archives and name them according to the names in fio.txt,
I do this

#!/bin/bash
while read REPLY; do
zip -r /nichego/$REPLY /archivs/* ;
done < fio.txt
at the output I get archives with only the last name, and not with the entire line (((

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
teenczm, 2021-02-14
@teenczm

6029370d3d651661356216.jpeg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question