Filth Posted September 1, 2011 Posted September 1, 2011 Hi guys, I have trouble with this script, which is supposed to create a directory based on the file name, then move that file into the directory. #!/usr/bin/bash find . -name '*.*' | \ while read filename do mkdir "${filename%.*}" directory=${filename%.*} mv "$filename" "$directory"/"$filename" done I get the following error when running it, does unraid have a "do" command? -bash: syntax error near unexpected token `do' cheers, Filth.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.