LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-10-2003, 12:13 AM   #1
Jalalabee
Member
 
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Rep: Reputation: 15
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

Last edited by Jalalabee; 09-10-2003 at 12:39 AM.
 
Old 09-10-2003, 12:50 AM   #2
Jalalabee
Member
 
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Original Poster
Rep: Reputation: 15
opps..messed up file-namage
 
Old 09-10-2003, 06:18 AM   #3
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
some semicolons might help. as would replacing * by `ls`
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
add user bash script noir911 Programming 4 08-13-2005 08:24 AM
how to change user in bash script c0d3 Programming 6 07-27-2005 11:34 AM
mask user input in a bash script PlatinumRik Linux - Software 1 06-15-2004 10:06 AM
User input using a BASH script... causticmtl Programming 5 07-13-2003 09:59 PM
BASH script inform user and kill process mounters Programming 3 02-11-2002 04:57 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration