I want to write a simple shell script that will go into all the sub-folders in a directory, and organise the files in the sub-folders into new directories. Basically in terminal it would look like:
cd ../subfolder1 mkdir newfolder mv *.txt newfolder cd ../subfolder2 mkdir newfolder mv *.txt newfolder etc.
cd command doesn't seem to work for the shell script.
Anyone know how I could do this?