I have a csh script I'm trying to convert to bash but I'm having problems with getting a for each loop to work properly. The loop is within an if statement:
Code:
if [ -e $file_list ]; then
while read -r i; do
mkdir $dir/file_$i
done < $file_list
else
:
fi
If the $frame_list file exists, then a directory needs to be created for each line in the file. The file has the directory name on each line:
2654
2655
2656
I've tried changing the NFS format to newline, but can't get the for each loop to move beyond the first line (ie. 2654).
This is probably a simple fix, but I can't work it out. Any advice would be appreciated!