🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: PIPEs (really: Slices)

#6611
From: Rev. Ben A. Mesander
Date: Wed, 14 Nov 1990 19:14
57 lines
3062 bytes
>In article <7032@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes:
>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

To push a belated point, I have the ARP shell, Ash, (ducking from Peter's
blow...) and GNU sed on my Amiga. So I can do it either way, and I have
pipes (|) that can tell if they are being used in a wildcard pattern or
not. Yes, I know that Ash and the ARP commands break some scripts, but it's
also possible to create two directories for commands, and assign c: to
whichever you like. Personally, I've never met a script that broke with the
ARP shell commands. I know, Peter, that you have apparently seen a lot of
them. I know of one bug in ASH - it doesn't always expand <$$> the way
that I want it to, but the advantages (pipes, better (In my opinion, OK?)
regular expressions, less disk space) outweigh any problems I may come
across. I've written some pretty hairy scripts to automate my UUCP setup,
and have no problems with the ARP commands - but the scripts were written
with and for the ARP commands, so that doesn't really count, does it?
Compatability? Hell, I don't care, I've got an Amiga 1000!

One more thing I'd like to inject into the pipe discussion is that the '+'
mechanism is not unique to the 'run' command. You can use it after
any command, and it will load the command and wait for you to press enter.
Be sure not to break this - I used to use it all the time when all I had 
was a single-floppy 512K machine. I could do a:
dir +<enter>
(switch disks)
<press enter again>
to get a directory of a disk... (I had no docs, and so I didn't know about
volume names). Just wanted to point out that + worked in other contexts
besides 'run' already.

>-- 
>Peter da Silva.   `-_-'
><peter@sugar.hackercorp.com>.

--
| ben@epmooch.UUCP   (Ben Mesander)       | "Cash is more important than |
| ben%servalan.UUCP@uokmax.ecn.uoknor.edu |  your mother." - Al Shugart, |
| !chinet!uokmax!servalan!epmooch!ben     |  CEO, Seagate Technologies   |
Technical Details
Message-ID: <ben.3416@epmooch.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!ogicse!unmvax!uokmax!servalan!epmooch!ben
References: <6997@sugar.hackercorp.com> <1990Nov7.235254.13959@opusc.csd.scarolina.edu> <7025@sugar.hackercorp.com> <1990Nov12.101531.19828@agate.berkeley.edu> <7032@sugar.hackercorp.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!ogicse!unmvax!uokmax!servalan!epmooch!ben
From: ben@epmooch.UUCP (Rev. Ben A. Mesander)
Newsgroups: comp.sys.amiga.tech
Subject: Re:  PIPEs (really: Slices)
Message-ID: <ben.3416@epmooch.UUCP>
Date: 14 Nov 90 19:14:01 GMT
References: <6997@sugar.hackercorp.com> <1990Nov7.235254.13959@opusc.csd.scarolina.edu> <7025@sugar.hackercorp.com> <1990Nov12.101531.19828@agate.berkeley.edu> <7032@sugar.hackercorp.com>
Lines: 57