• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Way to uncapitalize all files in *nix?

Entity

Lifer
I'm looking to move a bunch of files using capital letters to a different location, and make all of them uncapitalized. Is there any way to write a script to do this, without PERL?

thanks
Rob
 
Easy.

for file in `ls`; do mv $file `echo $file | tr '[A-Z]' '[a-z]'` ; done

Careful with the back quotes. Also, it will give you a warning/error if the file is already in lower case or if the file in lower case exists.

cl
 
open editor:

#!/bin/sh
for file in `ls`; do mv $file `echo $file | tr '[A-Z]' '[a-z]'` ; done

make it executable, name it, run it. ./<name>
 
Back
Top