Path: 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 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. `-_-' .