Other Help Topics :: lowercase to UPPERCASE - On command line



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...

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..

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

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.


original here.