kellywestbrooks
Registered
oh unix gurus, answer me this:
i have a 2-line csh script that reads as follows:
---<<BEGIN CODE>>---
#!/bin/csh
set line = $<
echo $line
---<<END CODE>>---
the file is saved as "line.csh"
when i execute the file from the command line:
[hostname] # ./test.csh
and i give it the line "hello world!" for input, it echos back to me:
hello
apparently, the "set line = $<" only stores the first word you type in into the variable line....shouldn't it store the entire line? i run this same script on solaris, and it spits back the entire input line....
...please explain
i have a 2-line csh script that reads as follows:
---<<BEGIN CODE>>---
#!/bin/csh
set line = $<
echo $line
---<<END CODE>>---
the file is saved as "line.csh"
when i execute the file from the command line:
[hostname] # ./test.csh
and i give it the line "hello world!" for input, it echos back to me:
hello
apparently, the "set line = $<" only stores the first word you type in into the variable line....shouldn't it store the entire line? i run this same script on solaris, and it spits back the entire input line....
...please explain