Here is what I want to accomplish:
move all files matching a certain phrase in their name to a new directory and unzip them all.
There are thousands of files so I'd rather not do this manually.
After trying a few things I ended up with:
Code:
mv $(ls | grep '<phrase>') /usr/local/etc/destination
cd /usr/local/etc/destination
unzip $(ls)
Which would work I think if all the filenames did not include spaces. But they do.
How can I either
1) remove all spaces in the file names (but I would rather keep them)
or (preferably)
2) get this script to work without removing the spaces in the filenames
Thanks