home *** CD-ROM | disk | FTP | other *** search
- From: tmilner@hprpcd.rose.hp.com (Tom Milner)
- Date: Thu, 23 Jul 1992 00:05:50 GMT
- Subject: Re: A Shell Problem -- HELP HELP HELP!!!
- Message-ID: <15250001@hprpcd.rose.hp.com>
- Organization: Performance Technology Center, Roseville
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!sdd.hp.com!hpscdc!hplextra!hpcc05!hpyhde4!hpycla!hpergfg2!hprdash!hprpcd!tmilner
- Newsgroups: comp.unix.wizards
- References: <1992Jul22.052116.5552@gucis.cit.gu.edu.au>
- Lines: 51
-
- In comp.unix.wizards, dconnors@gucis.cit.gu.edu.au (David Connors) writes:
- |
- |
- | HELP!
- |
- | I have a bit of a problem which I can't solve as I don't know enough about
- | using all of the thingamies (sed, awk etc) unix provides. Here's the problem:
- |
- | I have a set of directories similar to the following:
- |
- | rw-r--r-- 0/0 1874 Mar 23 03:05 1991 logos/org/aero/unknown/face.xbm
- | rw-r--r-- 0/0 1871 Jun 18 04:01 1991 logos/org/eff/unknown/face.xbm
- | rw-r--r-- 0/0 1874 Jun 3 09:47 1991 logos/org/ieee/unknown/face.xbm
- | rw-r--r-- 0/0 1877 Jun 3 09:48 1991 logos/org/mitre/unknown/face.xbm
- | rw-r--r-- 0/0 1871 Feb 14 01:35 1991 logos/org/osf/unknown/face.xbm
- |
- | .... about a thousand more lines ....
- |
- | Now, what I want to do it move all of the "face.xbm" files to one directory
- | level while simultaneously giving them distinct filenames (I don't care
- | what, although it would be nice if logos/org/osf/unknown/face.xbm became
- | something like logos.org.osf.unknown.face.xbm).
- |
- | If anyone can help I will be extremely grateful!
- |
- | Please reply via e-mail as I don't read news that often.
- |
- |
- |
- | Dave Connors - D.Connors@sct.gu.edu.au Griffith University, Australia
- | - -- ---=-==-=================================================-==--=--- -- -
- | " Remember, even if you win the rat race, you're still a rat! "
- | - Unknown
- | - -- ---=-==-=================================================-==--=--- -- -
-
- Try:
-
- find logos/org -name "face.xbm" | while read f; do
- newf=`echo $f | sed "s/\//./g"`
- mv $f $newf
- done
-
- _____________________________________
- /_______________ ___________________/
- / /
- / /
- / / Tom Milner (Tn: 785-5637)
- / / HP Performance Tech Center
- / / tom@hpptc16.rose.hp.com
- /_/ __________________________
-
-