Can sh or csh do this VMS DCL trick??
Tom Christiansen
tchrist at convex.COM
Sun Apr 28 10:34:14 AEST 1991
>From the keyboard of davis at pacific.mps.ohio-state.edu (John E. Davis):
: In VMS DCL I can do:
: $ create post_news.txt
: $ deck
: In VMS DCL I can do:
:
: .... etc....
: $ eod
: $ exit
:
: In other words, text following `$ deck' is treated as lines to be fed into
:the standard input of the previous command (create in this case). Finally,
:the `$ eod' terminates input and control is passed back to the DCL command
:procedure. How can I simulate this behavior in csh or sh? Solutions
:requiring two files are not acceptable.
Sounds like you want the ``here-is'' notation:
cat >post_news.txt <<EOD
blah blah
... etc ..
EOD
In Bourne-compatible shells (and perl) you can control whether variables
get interpolated in the intervening text: just quote the token (in this
case EOD), and you quote the text. The csh, to no one's great surprise,
has no such ability.
--tom
More information about the Comp.unix.questions
mailing list