Search Results

Search: Posts Made By: jjzieve
6,665
Posted By kurumi
since you are using some bash syntax, why not do...
since you are using some bash syntax, why not do the "cutting" using bash ?
6,665
Posted By kurumi
$ ruby -e 'Dir["*"].each{|x| File.rename(x, ...
$ ruby -e 'Dir["*"].each{|x| File.rename(x, x[0].downcase+x[1..-1]) if x[/^[A-Z]/] }'
6,665
Posted By otheus
My script doesn't nicely handle the case where...
My script doesn't nicely handle the case where the the file already has the proper name. In those cases, mv will complain about target and source being the same file. To prevent that, simply change...
6,665
Posted By otheus
Using less exotic languages (*poke*) : for...
Using less exotic languages (*poke*) :

for file in * ; do
newname="$(echo $file | cut -c 1 | tr 'a-z' 'A-Z')${file#?}"
/bin/mv "$file" "$newname"
done

The cut extracts the first...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 03:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy