🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1086

Re: How to do mv *.xyz *.abc in shell script??

#1086
From: Lance R. Bailey
Date: Fri, 07 Sep 1990 06:53
14 lines
1011 bytes
In article <5569@minyos.xx.rmit.oz>, rcoahk@chudich.co.rmit.oz (Alvaro Hui Kau) writes...
>So, Is there anyone out there can help me on this problem?

# changing *foo to *bar
for i in *foo
do
    j=`echo $i | sed -e 's/foo/bar/'`
    mv $i $j
done
_________________________________
Lance R. Bailey, Systems Manager | Robarts Research Institute
email: lrb@rri.uwo.ca            | Clinical Trials Resources Group
  vox: 519-663-3787 ext. 4108    | P.O. Box 5015, 100 Perth Dr.
  fax: 519-663-3789              | London, Canada N6A 5K8
Technical Details
Message-ID: <975@ria.ccs.uwo.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!ria!rrivax.rri.uwo.ca!lrb
References: <5569@minyos.xx.rmit.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!ria!rrivax.rri.uwo.ca!lrb
From: lrb@rrivax.rri.uwo.ca (Lance R. Bailey)
Newsgroups: comp.unix.shell
Subject: Re: How to do mv *.xyz *.abc in shell script??
Message-ID: <975@ria.ccs.uwo.ca>
Date: 7 Sep 90 06:53:50 GMT
References: <5569@minyos.xx.rmit.oz>
Sender: news@ria.ccs.uwo.ca
Reply-To: lrb@rrivax.rri.uwo.ca
Organization: Robarts Research Institute -- London Canada Earth
Lines: 14
News-Software: VAX/VMS VNEWS 1.3-4