Here is my problem: can we set the variables in the HERE DOCUMENT? I have tried but failed. Any one has good comments please let me know.
#!/bin/csh -f
pbrun -u xmgbrk runshell <<!
@ $num1 = `wc -l /home/tpltp/csh/scripts/who.csh`
echo "$num1"
if ( $num1 > 0 ) then
echo $num1 | tee -a /tmp/file.$$
endif
exit
!
echo "out of csh"
exit(0)
The output will be "@: Variable name must begin with a letter."
PS: I will have no chance to input the password for xmgbrk. this is also a problem.