my needs is to copy all files and folders of a "master" folder into all the usb keys mounted.
So, i wrote this code:
for usb_key in `ls /media/`; do for file in `ls -a /home/daniele/USB/MASTER`; do cp /home/daniele/USB/MASTER/"$file" /media/$usb_key/"$file" done; done; for usb_key in `ls /media`; do umount /media/$usb_key done; #alert me that the work is done totem /home/daniele/USB/0016.mp3 & exit
But, if i have a folder named "DO NOT DELETE" into
/home/daniele/USB/MASTER, this throw an error becose of the filenames.
So, how can i do solve that?
There is a way to replace all the whitespaces in the
$file var with