Wednesday, August 7, 2013

Read filenames from a text file and then make those files?

Read filenames from a text file and then make those files?

My code is given below. Echo works fine. But, the moment I redirect output
of echo to touch, I get an error "no such file or directory". Why ? How do
i fix it ? If I copy paste the output of only echo, then the file is
created, but not with touch.
while read line
do
#touch < echo -e "$correctFilePathAndName"
echo -e "$correctFilePathAndName"
done < $file.txt

No comments:

Post a Comment