Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: lowercase to UPPERCASE - On command line< Next Oldest | Next Newest >
NewDude Offline





Group: Members
Posts: 150
Joined: Feb. 2006
Posted: April 05 2006,21:24 QUOTE

ok...  thanks...
\
I knew about man... but I am at work and we are forced to use evil Windoze machines, so I couldn't check it out...

Huh... but wait, I just thought of something, I do have a LIVE CD of DSL 2.2B... I wonder if I should try to use it here...  

I think I will...
Back to top
Profile PM 
NewDude Offline





Group: Members
Posts: 150
Joined: Feb. 2006
Posted: April 06 2006,00:41 QUOTE

Hey guys... I made a script call tocap and put it in the /bin directory..

when I try to run it, it just says...

unable to rename 'ls': No such file or directory...

It is getting confused on the ls file listing command...  help!!

Please... thanks..
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: April 06 2006,02:49 QUOTE

make sure ls is in backticks (`ls`), not quotes ('ls').
ADDED for great help: Using backticks will result in the output of the ls command being used in the script.  For example, if the output of ls was "foo.txt bar.txt", the script would behave like this:
for i in foo.txt bar.txt; do <commands> done
The backticks are also used in this script to retrieve a new filename for your files (echos the original and then pipes that to tr, which replaces all lowercase characters with uppercase ones).
In bash, using $(ls) achieves the same thing as `ls`.

You can replace the command altogether by using a wildcard rather than ls:
for i in *;do mv $i `echo $i | tr 'a-z' 'A-Z'`;done


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
NewDude Offline





Group: Members
Posts: 150
Joined: Feb. 2006
Posted: April 06 2006,13:43 QUOTE

I that is the problem mikshaw...

I will correct it when I get home from work.

I am positive that is the problem.

Thanks.  You are guys are really a big help.  Every time I come on this forum, I learn more and more...

Thanks again...

I thought the wild * thing would have worked to ... thanks for clearing that up.
Back to top
Profile PM 
8 replies since April 05 2006,16:11 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: lowercase to UPPERCASE - On command line

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code