Bash for Loop in Shell Scripts: Syntax and Split Filenames
A for loop that renames files can act on half a filename, because bash splits the word list on whitespace before the body runs. A file holding the names report final.txt and notes.txt reaches the loop as three words, so the command in the body runs against a path that does not exist. Quoting inside
Bash for Loop in Shell Scripts: Syntax and Split Filenames Read More »