From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from highwire.stanford.edu ([171.64.249.40]) by hawkwind.utcs.utoronto.ca with SMTP id <25867>; Wed, 1 Mar 2000 13:09:36 -0500 Received: from aubrey.stanford.edu (jimr@aubrey.Stanford.EDU [171.64.31.58]) by highwire.stanford.edu (8.9.3/HIGHWIRE2.0) with ESMTP id IAA19806; Wed, 1 Mar 2000 08:17:16 -0800 (PST) Message-Id: <200003011617.IAA19806@highwire.stanford.edu> X-url: http://highwire.stanford.edu/~jimr/ X-face: "!ZH^<"U,NeU:732A To: Bengt Kleberg cc: sam-fans@hawkwind.utcs.toronto.edu, wilyfans@jli.com Dcc: Subject: Re: ssam, again In-reply-to: Message from Bengt Kleberg of "Wed, 01 Mar 2000 16:01:39 +0100."References: <200003011501.QAA08510@trillian.softwell.se> <200003011501.QAA08510@trillian.softwell.se> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <19165.951927435.0@aubrey.stanford.edu> Sender: jimr@aubrey.stanford.edu Date: Wed, 1 Mar 2000 11:17:51 -0500 ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19165.951927435.1@aubrey.stanford.edu> > There has been previous incarnations of a stream version of sam. I have > used one by Alistair Crooks agc@westley.demon.co.uk. Here is a new one, > implemented as a rc script using sam -d. Since the fans email list is > low volume I hope that you will all survive that I email b oth the script > and the man page in seperate emails :-) > > I have thought about including this script with sam-9libs. Is it > sufficiently useful, or does it detract so much from sam that it > should be kept hidden? It's always nice to see useful wily scripts. I don't know if I ever posted or sent this one out, but I have a copy of a sam script someone posted to sam-fans ages ago. It is neat in that it uses a FIFO instead of a temporary file. It is no where near as flexibly as what you posted, but I thought you might be interested... ------- =_aaaaaaaaaa0 Content-Type: text/plain; name="wsam"; charset="us-ascii" Content-ID: <19165.951927435.2@aubrey.stanford.edu> Content-Description: FIFO based sam #!/opt/plan9/bin/rc umask 077 if ( ~ $#* 0) { echo >[1=2] Usage: wsam commands ... builtin exit 1 } if ( test -d /usr/tmp ) { tmp_dir=/usr/tmp } else if ( test -d /var/tmp ) { tmp_dir=/var/tmp } else if ( test -d /tmp ) { tmp_dir=/tmp } else if ( test -d $HOME ) { tmp_dir=$HOME } else { echo >[1=2] wsam: I cannot find a nice place to put my FIFO builtin exit 1 } FIFO=$tmp_dir^'/'^wsam.$pid.rd mkfifo -m 0700 $FIFO { echo 'r '$FIFO while ( ! ~ $#* 0 ) { echo $1 shift } echo ',p' } | sam -d >[2=] & cat >$FIFO wait $apid rm -f $FIFO builtin exit 0 ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19165.951927435.3@aubrey.stanford.edu> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - James A. Robinson jim.robinson@stanford.edu Stanford University HighWire Press http://highwire.stanford.edu/ 650-723-7294 (W) 650-725-9335 (F) ------- =_aaaaaaaaaa0--