From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from weaver-gw.netapp.com ([198.95.224.2]) by hawkwind.utcs.utoronto.ca with SMTP id <24649>; Sat, 3 May 1997 14:33:06 -0400 Received: from netapp.com ([192.9.200.1]) by weaver.netapp.com with SMTP id <246213-189>; Sat, 3 May 1997 00:55:47 -0700 Received: by netapp.com (4.1/SMI-4.1) id AA15487; Sat, 3 May 97 00:57:30 PDT Date: Sat, 3 May 1997 03:57:30 -0400 From: byron@netapp.com (Byron Rakitzis) Message-Id: <9705030757.AA15487@netapp.com> To: culliton@clark.net, rc@hawkwind.utcs.toronto.edu Subject: Re: Speaking of counting... Cc: john@LoVerso.Southborough.MA.US, rsalz@osf.org Here's my version of seq: #!/bin/rc switch ($#*) { case 1 lo=1; hi=$1; incr=1 case 2 lo=$1; hi=$2; incr=1 case 3 lo=$1; hi=$2; incr=$3; case * echo 'usage: seq [ lo ] hi [ incr ]' >[1=2]; exit 1 } awk 0) { for (i = '$lo'; i <= '$hi'; i += '$incr') print i } else { for (i = '$lo'; i >= '$hi'; i += '$incr') print i } }' It's possible that I got this from Paul Haahr (or someone else for that matter --- I know my input-less awk scripts do all their work in the BEGIN clause), and I don't have my plan9 manuals with me in Europe so I have no idea if it matches up with plan9 seq.