renaming lots of files

renaming lots of files

Post by Tim Butl » Sat, 11 Nov 1995 04:00:00



:I need to change the case of about 1200 filenames (lower to upper), I am
:currently trying to figure out how to do it with awk or sed,
:but with no luck.  Any suggestions are greatly appreciated!

if the list of files is in a file, one per line:

while read lower
do
upper=`echo $lower | tr 'abcdefghijklmnopqrstuvwxyz' \
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
/bin/mv $lower $upper
done < list_of_the_files

or if there aren't too many to use 'ls whatever.*':

for f in `ls whatever.*`
do
...
done

--
tim butler

 
 
 

renaming lots of files

Post by Olaf Hop » Sat, 11 Nov 1995 04:00:00


your tr command may be abbreviated as

.. | tr '[a-z]' '[A-Z]'

========================================================
     __0      Olaf Hopp
   _-\<,_     SysAdmin at Pasta-Pool

========================================================

 
 
 

renaming lots of files

Post by d.. » Mon, 13 Nov 1995 04:00:00


: if the list of files is in a file, one per line:

[deleted]

: or if there aren't too many to use 'ls whatever.*':

OK. How does one define "not too many"? Is there a suggested limit
where the while read method outlined in your answer should be
favored over a 'for f in `ls` approach?

: tim butler

--
------------------------------------------------------------------------
David E. Fox                 Tax              Thanks for lettimg me


-----------------------------------------------------------------------

 
 
 

1. renaming lots of files

Hi.

I need to rename lots of files in one of my directories.   I would like
to move all the files ending in .f to .F
I tried futilely to do
mv *.f *.F
but it doesn't work.  I am working on a Linux system, but I don't think
that is what is causing the "problem" - I probably just don't have the
right command.   Is there a way to move multiple files like this?   What
command would I have to type?

Thanks for your help.

2. PPP dial-up only working part-time

3. Renaming lots of files

4. Can't see all of memory on Compaq Prolinea 575

5. newbie need to rename lots of files

6. finger question

7. Renaming lots of files

8. seyon--how to get scroll

9. How to rename a lot of files into lower case?

10. Renaming a lot of similarly named files

11. How to rename a lot of files ?

12. Help using awk and bash script to copy and rename lots of index.htm files

13. consistent read() on file while rename() file.new -> file?