LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   bash script problem...or user error? (https://www.linuxquestions.org/questions/programming-9/bash-script-problem-or-user-error-91124/)

Jalalabee 09-10-2003 12:13 AM

bash script problem...or user error?
 
script:

# !/bin/bash
#
# Script to convert file names to lower case.
#
for i in *
do
echo $i
mv $i `echo $i | tr "[A-Z]" "[a-z]" `
done


log:

user@computer:~/ID1$ bash ~/lowercase
'home/jalal/lowercase: line 6: syntax error near unexpected token `do
'home/jalal/lowercase: line 6: `do


ive search around, found plenty of bash scripts to rename the files in a directory all to lowercase. saving them to my home dir as things such as "lowercase" and running them by "bash ~/lowercase" in the folder i .. errors?

thanks in advance!! ;-D

Jalalabee 09-10-2003 12:50 AM

opps..messed up file-namage

kev82 09-10-2003 06:18 AM

some semicolons might help. as would replacing * by `ls`


All times are GMT -5. The time now is 03:15 AM.