'!#' script interpreter convention ...
From: Saurabh Verma (saurabh_verma78_at_yahoo.com)
Date: 04/29/03
- Next message: William Park: "Re: Shell Script"
- Previous message: scriptOmatic: "Re: what is the difference?"
- Next in thread: John DuBois: "Re: '!#' script interpreter convention ..."
- Reply: John DuBois: "Re: '!#' script interpreter convention ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 28 Apr 2003 17:16:10 -0700
Hi,
I have some confusion regarding usage of '#!' at the first line of any
executable script. I am writing a perl script(say 'test.pl'), with
first line as '#!perl', but when i am running command 'test.pl' on
command line, getting the following error:
test.pl: Command not found.
I am using tcsh shell, on solaris platform.
whereas running 'perl test.pl' is woking.
Or, if i replace the first line with '#!/usr/local/bin/perl', then
also its woking.
So, do i need to give the full path of the executable on the first
line??
Till now, i had the understanding that '#!interpreter args' in the
first line of a script will lead the shell to run command 'interpreter
args script-file', that in my case is 'perl test.pl'(which is working
fine, when i am running it from command line).
Can somebody tell me, how exactly '#!' is handled by a shell in
general and by tcsh in this specific case.
Thanks a lot ...
Saurabh
- Next message: William Park: "Re: Shell Script"
- Previous message: scriptOmatic: "Re: what is the difference?"
- Next in thread: John DuBois: "Re: '!#' script interpreter convention ..."
- Reply: John DuBois: "Re: '!#' script interpreter convention ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|