9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] find acme 'window' name from which program B2-ed?
Date: Mon, 28 Nov 2005 15:49:25 -0500	[thread overview]
Message-ID: <ee9e417a0511281249w6ce791cah386134a778de2085@mail.gmail.com> (raw)
In-Reply-To: <200510122248.j9CMmb720817@zamenhof.cs.utwente.nl>

I used this today for a talk about shell scripts and scripting
in general.  It provided a nice illustration midway through the
talk.  These are the final versions I used (on Unix).
Three scripts: Slide, Slide-, and Slide+.

lucidasans/unicode.13.font was good, though I might have
preferred something ever so slightly larger.

Thanks!
Russ

# To unbundle, run this file
echo Slide
sed 's/.//' >Slide <<'//GO.SYSIN DD Slide'
-#!/usr/local/plan9/bin/rc
-
-echo name `{pwd}^/$1 | 9p write acme/$winid/ctl
-echo clean | 9p write acme/$winid/ctl
-echo get | 9p write acme/$winid/ctl
-
//GO.SYSIN DD Slide
echo Slide+
sed 's/.//' >Slide+ <<'//GO.SYSIN DD Slide+'
-#!/usr/local/plan9/bin/rc
-
-name=$%
-current=`{basename $name}
-currentx=`{9 grep -n '^'$current'([ 	]|$)' index | sed 's/:.*//'}
-
-pagex=`{echo $currentx + 1 | hoc}
-page=`{sed -n $pagex^p index | awk '{print $1}'}
-if(~ $#page 0){
-	echo no such page
-	exit 0
-}
-
-Slide $page
//GO.SYSIN DD Slide+
echo Slide-
sed 's/.//' >Slide- <<'//GO.SYSIN DD Slide-'
-#!/usr/local/plan9/bin/rc
-
-name=$%
-current=`{basename $name}
-currentx=`{9 grep -n '^'$current'([ 	]|$)' index | sed 's/:.*//'}
-
-pagex=`{echo $currentx - 1 | hoc}
-if(~ $pagex 0){
-	echo no such page
-	exit 0
-}
-page=`{sed -n $pagex^p index | awk '{print $1}'}
-if(~ $#page 0){
-	echo no such page
-	exit 0
-}
-
-Slide $page
//GO.SYSIN DD Slide-


  reply	other threads:[~2005-11-28 20:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-11 20:12 Axel Belinfante
2005-10-11 21:19 ` Russ Cox
2005-10-12 22:48   ` Axel Belinfante
2005-11-28 20:49     ` Russ Cox [this message]
2005-10-11 20:47 Federico G. Benavento
2005-10-11 22:12 ` Axel Belinfante

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=ee9e417a0511281249w6ce791cah386134a778de2085@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@cse.psu.edu \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).