[FSFTN] shell script - converting blanks in file name to underscores
Bharath Kumar
bharath79in at rediffmail.com
Sun Apr 15 10:00:35 CDT 2012
Hi Linux Group,
I have written a code that will convert blanks in file name to underscores. The resultant file type and the path name will be displayed. Please suggest me if the code needs any improvement. Also please give me some assignments so that I will learn shell scripting. I am a linux newbie. Please find the code snippet here :
#!/bin/bash
echo -e "Input the file that you want to search: c"
read input
find ~ -name ${input}
echo -e "Input the file that you want: c"
read input1
echo -e "Input the file name with underscore instead of space: c"
read newfile
mv "$input1" "$newfile"
file ${newfile}
find ~ -name ${newfile}
Thanks and Regards,
Bharath Kumar A.V.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://fsftn.org/pipermail/mailinglist_fsftn.org/attachments/20120415/63171538/attachment.html>
More information about the Mailinglist
mailing list