groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] What does 'groff <<<foo' do?


From: Tadziu Hoffmann
Subject: Re: [Groff] What does 'groff <<<foo' do?
Date: Mon, 3 Dec 2012 22:54:46 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

[...]
> > 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

[Prev in Thread] Current Thread [Next in Thread]