On Fri, 2 Jan 2004, Amey Gokhale wrote:

> #!/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 

both are running under bash.  The #!/bin/csh line is a regular shell 
comment, it does not affect the script in any way.  The shell looks at 
the first two bytes of the file to determine what type of executable it 
is.  If the first two bytes are #!, it is an interpreted program, and 
the rest of the line lists the path to the interpreter.

Please don't top-post.

-- 
Avert misunderstanding by calm, poise, and balance.




-- 
http://mm.ilug-bom.org.in/mailman/listinfo/linuxers

Reply via email to