[nflug] file name extensions

Mark T. Valites mark-nflug at valites.net
Thu Nov 16 14:10:45 EST 2006


On Thu, 16 Nov 2006, eric wrote:

> How would I recurse into sub directories(I'm in bash)
>
> Robert Meyer wrote:
>
>> in bash:
>> for name in `ls <directory of files`; do

Randal Schwartz would probably have a couple things to say if he saw the 
line above:

http://partmaps.org/era/unix/award.html#ls

In addition, files with spaces in their name would cause problems, and as 
eric writes, it doesn't take into consideration directories.

You probably want to use the 'find' command with the 'exec' arg with 
either mv or the 'rename' utility.

_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list