Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C Shell Comments HELP

Status
Not open for further replies.

8861889

Programmer
Dec 5, 2001
1
US
I don;t know why, this might sound ridiculous, but on some of the unix c scripts I simply use # for comments

but on some other scripts like an ftp and mail script i tried to add some comments with #, it will actually cause me error: 0; Event not found....

this is exactly what i put
#
mailx -s &quot;Title goes here&quot; applle@aol.com<<-EOF
hello!! hello!
EOF

and sometimes i write

#
mail -s &quot;Title goes here&quot; applle@aol.com<<-EOF
hello!! hello!
-EOF

both will work fine without the # comment thing, any help? thanks
 
Hi,
All CSH scripts must start with....

#!/bin/csh

or the script will use the default shell on the box when it is execute.

It is possible if your above examples are the exact script that it is being executed by SH or KSH and maybe they don't like the

# comment

syntax.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top