i modified my script lil bit for testing purpose. now my script is
#!/bin/bash echo "IN BASH" #!/bin/csh echo "IN CSH"
it echoes both lines .... does tht mean i can write script (peculiar to different interpreters - bash/csh/ksh ... ) in a single script file like above? juss write the shell interpreter to be used at the start of each scripting section n then write code specific to tht shell in a single file ... is it feasible?
thks n regds, amey.
Philip S Tellis wrote:
On Fri, 2 Jan 2004, Amey Gokhale wrote:
below is a script ... which has many lines as comments at the start. still it works.
#test.sh #it doesn;t matter how
[snip]
this works but wonder in such case. ... which shell ll be invoked .... bash or csh?
/bin/sh or the current shell will be used. /bin/sh is generally a symlink to /bin/bash (it *must* be a link to a POSIX compliant shell. csh is not POSIX compliant)