C-shell variables
Lars Poulsen
lars at spectrum.CMC.COM
Tue Aug 21 09:34:36 AEST 1990
In article <728 at travis.csd.harris.com> brad at SSD.CSD.HARRIS.COM (Brad Appleton) writes:
>I need to have a C shell variable contain a new-line.
>??? SO what must I put into "tmp" to get a newline into $foo:q ???
>
>Please dont post solutions that dont use "eval `cat file`"; such
>solutions will be of no use to me.
Together, let's RTFM:
> CSH(1) USER COMMANDS CSH(1)
>
> Command Substitution
> A command enclosed by backquotes (`...`) is performed by a
> subshell. Its standard output is broken into separate words
> at each SPACE character, TAB and NEWLINE; null words are
> discarded. This text replaces the backquoted string on the
> current command line. Within double-quotes, only NEWLINE
> characters force new words; SPACE and TAB characters are
> preserved. However, a final NEWLINE is ignored. It is
> therefore possible for a command substitution to yield a
> partial word.
In other words, it is impossible to have a newline come out of a
backquote substitution, because it will be turned into a space.
--
/ Lars Poulsen, SMTS Software Engineer
CMC Rockwell lars at CMC.COM
More information about the Comp.unix.questions
mailing list