Re: bash scripts and files
- From: "Iñigo Tejedor Arrondo" <inigo.listas@xxxxxxxxx>
- Date: Sun, 30 Dec 2007 18:34:26 +0100
2007/12/30, michael <cs@xxxxxxxxxxxxxxxxxxxxxxxxxxx>:
Folks, can somebody point me to an authorative reference that
explains when one needs to put, eg,
#!/bin/bash
as the first line of a script and whether or not it's required/
surplus/ignored for bash specific files such as .bashrc
and .bash_profile
many thanks but couldn't find it quickly using 'oogle. M
In a script that line specifies the interpreter to use to execute the
following lines on the script. It may be any interpreter that you
want: bash, sh, ksh, perl, python,etc..
In .bashrc, .bash_profile or other files that are "included" from
other interpreter/scripts you dont need the interpreter line.
As a note, if you are planning to write portable scripts, please use
#!/bin/sh and avoid "bashism" (like [ $foo -ge 1 ]) in the syntax.
Greetings
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- References:
- bash scripts and files
- From: michael
- bash scripts and files
- Prev by Date: bash scripts and files
- Next by Date: Re: temperature problems
- Previous by thread: bash scripts and files
- Next by thread: Re: bash scripts and files
- Index(es):
Relevant Pages
|
|