Hi All;
Please forgive me for butting in.
But I have been telling (shouting actually) people to ALWAYS ALWAYS
start their scripts with a #!<explicit shell>
Forgive me if I am totally off topic here, but are you guys (and gals?)
saying that it is not necessary??????
Warmest Regards
Steven Sim
Darren J Moffat wrote:
Josip Gracin wrote:
[EMAIL PROTECTED] wrote:
But first tell us what exactly is standards complaint about:
#!/bin/sh
Please note that I did NOT claim this to be either standard or
correct in any of my posts, nor do I require for this to remain in
the scripts. It can be changed.
Probably, if you want to run standard complaint scripts, you'd start
them
of with:
:
(a colon on a single line)
This should cause them to be executed by the shell in a POSIX compliant
environment when executed by a POSIX compliant shell.
I am not sure I understand you correctly. Are you suggesting that I
should avoid #! and use explicit invocation of shell interpreter to
run scripts?
You could try something like this:
#!/bin/sh
if [ -x /usr/xpg4/bin/sh -a "$_" != /usr/xpg4/bin/sh ]; then
exec /usr/xpg4/bin/sh $0 $*
exit $?
fi
# rest of script from here on down
Fujitsu Asia Pte. Ltd.
_____________________________________________________
This e-mail is confidential and may also be privileged. If you are not the intended recipient, please notify us immediately. You should not copy or use it for any purpose, nor disclose its contents to any other person.
Opinions, conclusions and other information in this message that do not relate
to the official business of my firm shall be understood as neither given nor
endorsed by it.
_______________________________________________
opensolaris-discuss mailing list
[email protected]