Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Shell question about placement of #! /bin/ksh

$
0
0
Hi,

This is a weird situation that I have noticed -

If I have the following shell

Code:

#! /bin/ksh                  #use korn shell
. /cpspb/logicals.ksh        #execute logicals
set -o allexport            #turn on allexport procedure

#####  For instrument testing: in-house

print " We are executing the SHELL"
print $DAY $MMM $YY
exit 999

This code will not work if the first line has the commend next to it.

But it will work if I leave in the comment and make sure I leave a space above the first line.

Can someone tell me what is going on.

Also is the shell running correctly if I have comments at the top of the page.

Thanks,
NewUser123

Viewing all articles
Browse latest Browse all 16232

Trending Articles