rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: John Mackin <john@syd.dit.csiro.au>
To: The rc Mailing List <rc@archone.tamu.edu>
Subject: Re: early reaction(s) to rc
Date: Fri, 23 Aug 1991 22:48:43 -0500	[thread overview]
Message-ID: <9108241348.26582.rc.bafub@syd.dit.csiro.au> (raw)
In-Reply-To: <9108241015.914.rc.bafoy@syd.dit.csiro.au>

I wrote:

    eval `{ whatis | rev | sed -n -e '/ nf$/s/^.*{\(.*\)$/\1/p' | rev }

    You can't really do without the two rev's, [...]

Apologies to all on the list, I must've been drunk :).  Sheesh, do I
feel like a silly person; the above, of course, _still_ doesn't work
in the presence of function names containing {.  Anyway it can be done,
but I don't have time now to fully test an implementation, and rather
than mail another implementation that isn't fully tested, I'll just
describe how to write the sed:

- any line beginning with "fn " either does or doesn't begin with "fn '"
- if it doesn't, then the function name terminates at the second
  space character on the line
- if it does, then the function name terminates at the first "'" character
  following the "'" character in "fn '" which is not preceded by a "'"
  (wow, thank Duff for rc's simple, consistent quoting rules!)

And you don't need any rev's, just the sed.

Hangs head in shame....

OK,
John.



  reply	other threads:[~1991-08-24  3:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-08-23 20:47 Arnold D. Robbins
1991-08-24  0:15 ` John Mackin
1991-08-24  3:48   ` John Mackin [this message]
1991-08-24 15:10     ` Severe egg on face John Mackin
  -- strict thread matches above, loose matches on Subject: below --
1991-08-27  6:24 early reaction(s) to rc Paul Haahr
1991-08-27  7:15 ` Chris Siebenmann
1991-08-27 10:22 ` Boyd Roberts
1991-08-23 16:51 DaviD W. Sanderson
1991-08-23 17:07 ` Boyd Roberts
1991-08-23 16:24 Arnold D. Robbins
1991-08-27  2:33 ` Chris Siebenmann
1991-08-23  1:36 new list subscriber Byron Rakitzis
1991-08-23 13:40 ` early reaction(s) to rc John Mackin
1991-08-27  2:28   ` Chris Siebenmann

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=9108241348.26582.rc.bafub@syd.dit.csiro.au \
    --to=john@syd.dit.csiro.au \
    --cc=rc@archone.tamu.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).