home *** CD-ROM | disk | FTP | other *** search
- From: srini@hpcuhe.cup.hp.com (Sreenivasa R Tellakula[C])
- Date: Thu, 20 Aug 1992 23:34:31 GMT
- Subject: Re: Changing file names
- Message-ID: <31810002@hpcuhe.cup.hp.com>
- Organization: Hewlett Packard, Cupertino
- Path: sparky!uunet!usc!sdd.hp.com!hpscdc!hplextra!hpcc05!hpcuhb!hpcuhe!srini
- Newsgroups: comp.unix.questions
- References: <ac#n06l.bosak@netcom.com>
- Lines: 19
-
-
- following script should be able to change file names
-
-
- #!/bin/ksh
- for i in `ls`
- do
- echo $i | sed s/xyz// >j
- mv $i `cat j`
- done
- rm j
- #end script
- #assumption is that the file by name j is not
- #existing in the directory
-
-
-
- -- TSR
- srini@cup.hp.com
-