[...]
> > in a shell script file would  cat  the content, down to the
> > end of the file, into  outfile  just as if you were typing
> > it at a terminal!

> :-)  This was back when the script's stdin was the script.

This is similar to how you can read the input stream in
Postscript.  Normally the interpreter reads tokens from the
input stream and executes them, but you can also read stuff
yourself, using something like

  /card 80 string def
  currentfile card readstring

or

  currentfile token

This is especially useful in a loop, for example to read data
into an array.


> I liked how goto worked by altering the position in the file
> ready for the next line, which is how we ended up with `:',
> familiar to users of sed(1).

Or to batch file programmers using command.com :-D



Reply via email to