[olug] Unix Tip: MANIPULATE MULTIPLE FILES
Unix Guru Universe
listserv at ugu.com
Tue Dec 3 19:02:46 UTC 2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 2163 - December 3, 2002
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
MANIPULATE MULTIPLE FILES
If you have a directory with
large number of files and you
want to rename or copy or
process it, here is a simple
way to do it;
# for temp in *
> do
> echo cp $temp $temp.org >> t.txt
> done
You can change the copy command
to what ever that you need to
do. This will create a file
tmp.txt with all the files
listed in the current working
directory and insert a line
into the file tmp.txt as;
cp filename filename.org
This tip generously supported by: tyl at computer.org
--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today
==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.
Unix Guru Universe - www.ugu.com - tips at ugu.com - Copyright 1994-2001
==========================================================================
More information about the OLUG
mailing list