Hi First I thing that having spaces in filenames is like wearing a tee shirt saying "hit me!".
I'm trying to backup all my wife's pictures and although I can do any one file on CLI doing a script is humbling me. If anyone can help I'd be grateful. Thanks .... #!/bin/bash [email protected]:/mnt/photos >list let j=1 for i in tif jpg JPG jpeg ORF NEF do find . -type f -name "*$i" |grep -v -i thumb | while read filename do fn=`basename \"$filename\"` #echo BN ------ $fn >> list fm=`echo $fn |sed 's/ /_/g'` #echo CLEAN---- $fm >>list echo scp \"$filename\" $HOST/\"$j.$fm\" >>list let j=$j+1 done done scp "READ ME" [email protected]:"READ\\ ME" This should and does work, but I've spent a 1/2 day fighting filename_with_a_" some where when trying to script it. The task is easy but messy, if all else fails I'll go on a fishing expedition with backslashes James -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
