Other Help Topics :: lowercase to UPPERCASE - On command line
This is for the total commandline geek...
Is there a way to change a group of files in a Linux directory from lowercase to uppercase....
As powerful as the command line is in Unix/Linux, I would think there was.
If not, I guess I need to write a script to do this?
I have PunBB running on my system, the styles are showing up in my browser. I read on their forum is could a lowercase thing. They suggested making the php, css files all uppercase.Not sure on a single command, but heres a quick and dirty bash script to do it:
#!/bin/sh for name in `ls` do mv $name `echo $name | tr 'a-z' 'A-Z'` donesafesys, you got it. You could put what you had on a single command line:
for i in `ls`;do mv $i `echo $i | tr 'a-z' 'A-Z'`;doneOk... Thanks to both of you guy for replying..
So I just type for i in `ls`;do mv $i `echo $i | tr 'a-z' 'A-Z'`; in the directory that has the lowercase files?
Isn't there a wildcard and I could use to change every file in that directory... I think there is 15 files in the root and other files in the other subdirectories...
O I see for i (array number is i) in 'ls'; saying every file using the ls command to list the files in the directory.. I know what echo is... i$ is the array number which points to the value in the array, (variable).. piped what is tr... some type of string maniplication function?
command line in Linux is powerful.. amazing.. I need to learn this stuff better...don't forget you can use "man command" to get more info on specific commands
eg: man tr
Quote
NAME tr - translate or delete characters
SYNOPSIS tr [OPTION]... SET1 [SET2]
DESCRIPTION Translate, squeeze, and/or delete characters from standard input, writing to standard output.