From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost by hawkwind.utcs.toronto.edu with SMTP id <25678>; Mon, 8 May 2000 05:03:25 -0400 To: rc Subject: Re: building rc on QNX4 In-Reply-To: Date: Mon, 8 May 2000 04:58:21 -0400 From: Chris Siebenmann Message-Id: <00May8.050325edt.25678@hawkwind.utcs.toronto.edu> | There is no *need* to make `read' a builtin: see the EXAMPLES file in | the distribution for an alternative. Unfortunately the example doesn't work in several very useful situations: it will badly flub the common scripting idiom of 'generate stuff | {while (read foo) {....}}', never processing most of the actual output. In order to make this work, you need to find a utility that is guaranteed to read no more than the first line of standard input. Most utilities (eg awk) will happily eat an entire large buffer worth of standard input and then give you the first line back. This is unfortunate if you wanted to read the rest of the buffer's worth of input later. read is the one extra command that I really think should be a builtin. I believe there are good versions that are simple to add (through the existing hooks) in the mailing list archives[*]. - cks [*: ftp://ftp.sys.utoronto.ca/pub/rc/ for new people.]