🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #6585

Re: PIPEs (really: Slices)

#6585
From: Peter da Silva
Date: Tue, 13 Nov 1990 15:51
26 lines
1240 bytes
In article <1990Nov12.101531.19828@agate.berkeley.edu> pete@violet.berkeley.edu (Pete Goodeve) writes:
> Ah.  You were asking a little while ago what Mat did that was unique.
...
>         REN whatever.(c|h) old.^F
>         REN whatever^.(c|h) ^0_OLD^1

Oh, yeh. I use "sed" for this on UNIX. It works fine because we have pipes...

: ren file... sedcmd
FILES=
PAT=
for i
do
	FILES="$FILES $PAT"
	PAT=$i
done
for i in $FILES
do
	mv $i `echo $i | sed "$PAT"`
done

(now if this was comp.unix Randall Schwartz would jump in at this point
 with a perl script....)
-- 
Peter da Silva.   `-_-'
<peter@sugar.hackercorp.com>.
Technical Details
Message-ID: <7032@sugar.hackercorp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!peter
References: <6997@sugar.hackercorp.com> <1990Nov7.235254.13959@opusc.csd.scarolina.edu> <7025@sugar.hackercorp.com> <1990Nov12.101531.19828@agate.berkeley.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!peter
From: peter@sugar.hackercorp.com (Peter da Silva)
Newsgroups: comp.sys.amiga.tech
Subject: Re: PIPEs (really: Slices)
Message-ID: <7032@sugar.hackercorp.com>
Date: 13 Nov 90 15:51:10 GMT
References: <6997@sugar.hackercorp.com> <1990Nov7.235254.13959@opusc.csd.scarolina.edu> <7025@sugar.hackercorp.com> <1990Nov12.101531.19828@agate.berkeley.edu>
Reply-To: peter@sugar.hackercorp.com (Peter da Silva)
Organization: Sugar Land Unix - Houston
Lines: 26