I have a file (ordered_names) which is in the format
pub 000.html
pub.19 001.html
for about 300 lines, And I can't find a way to feed this to the mv command.
I have read Provide strings stored in a file as a list of arguments to a command?, but I could not get what I came for.
Here are some of the attempts I made :
for line in "$(cat ../ordered_files.reversed)"; do mv $(echo "$line"); done
for line in "$(cat ../ordered_files.reversed)"; do echo mv $(echo $line | cut -d' ' -f 1) $(echo $line | cut -d' ' -f 2) ; done
find -exec
doesn't work with cat. – ilkkachu Dec 16 '17 at 13:37