sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: "James A. Robinson" <jim.robinson@stanford.edu>
To: Bengt Kleberg <bengt@softwell.se>
Cc: sam-fans@hawkwind.utcs.toronto.edu, wilyfans@jli.com
Subject: Re: ssam, again
Date: Wed, 1 Mar 2000 11:17:51 -0500
Message-ID: <200003011617.IAA19806@highwire.stanford.edu> (raw)
In-Reply-To: Message from Bengt Kleberg <bengt@softwell.se>  of "Wed, 01 Mar 2000 16:01:39 +0100."References: <200003011501.QAA08510@trillian.softwell.se>  <200003011501.QAA08510@trillian.softwell.se>

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

> 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...


[-- Attachment #2: FIFO based sam --]
[-- Type: text/plain, Size: 584 bytes --]

#!/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

[-- Attachment #3: Type: text/plain, Size: 243 bytes --]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
James A. Robinson                       jim.robinson@stanford.edu
Stanford University HighWire Press      http://highwire.stanford.edu/
650-723-7294 (W) 650-725-9335 (F)   

  reply	other threads:[~2000-03-01 18:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-01 15:04 Bengt Kleberg
2000-03-01 16:17 ` James A. Robinson [this message]
     [not found] <bengt@softwell.se>
2000-03-06 11:06 ` Bengt Kleberg
2000-03-07  0:36   ` James A. Robinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003011617.IAA19806@highwire.stanford.edu \
    --to=jim.robinson@stanford.edu \
    --cc=bengt@softwell.se \
    --cc=sam-fans@hawkwind.utcs.toronto.edu \
    --cc=wilyfans@jli.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

sam-fans - fans of the sam editor

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/sam-fans

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 sam-fans sam-fans/ http://inbox.vuxu.org/sam-fans \
		sam-fans@hawkwind.utcs.toronto.edu
	public-inbox-index sam-fans

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.sam-fans


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git