Hi All,
I want to load into the variable very long string (more than 80 characters) . For example:
#!/bin/tcsh
set VAR = "abcdefg qwertyuiop hjklgfdsaqwerttt etc etc etc etc ...."
echo $VAR
In order to make the script easier to read, I wold like to split the string into two lines. For example:
#!/bin/tcsh
set VAR = "abcdefg qwertyuiop \
hjklgfdsaqwerttt etc etc etc etc ...."
echo $VAR
It does not work.
Is there a way to accomplish this ?
Igor
P.S (Nov 5th 2006)
I've made a typo in the code snippets from above. Both $VAR should be quoted. In all my attempts on terminal, I've used "$VAR"... but when I've posted the question on LQ, I made a mistake. Sorry for the confusion
Summary:
echo "$VAR" does not work in second case
echo $VAR works in both cases
I've figured it out after reading case (4) on this link
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/, posted by soggycornflake as post #5 bellow.