Re: bash scripts and files



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/31/07 05:07, michael wrote:

On 30 Dec 2007, at 18:11, Gerard Robin wrote:

On Sun, Dec 30, 2007 at 05:17:43PM +0000, michael wrote:
From: michael <cs@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: debian user <debian-user@xxxxxxxxxxxxxxxx>
Subject: bash scripts and files

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
have look at:
http://tldp.org/LDP/abs/html/invoking.html
The whole tutorial is in the package: abs-guide

Thanks, probably the previous chapter ("she-bang") was of more use but a
useful ref. However, I'm still trying to understand why it's not usual
to have a she-bang for the .bash_profile and .bashrc files. That
documentation reads as if it's expected - they are scripts and contain
shell specific syntax.

Probably because those files are "sourced" from within another
process instead of directly executable from the command line.

- --
Ron Johnson, Jr.
Jefferson LA USA

"Your mistletoe is no match for my TOW missile." Santa-bot
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHeSp6S9HxQb37XmcRAi/0AJ9qapUi8ZsCiOq2JY5n3IoeeJClLwCeNnLY
coeJqZYesLAESd1d7CUaspg=
=S2v4
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: bash scripts and files
    ... Subject: bash scripts and files ... I'm still trying to understand why it's not usual to have a she-bang for the .bash_profile and .bashrc files. ... That documentation reads as if it's expected - they are scripts and contain shell specific syntax. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Bash usage: was implicit linkage
    ... I'm positive you could have written this shellscript without ... wrote some useful code in that language for my job as an engineer. ... BASH scripts are written in perfectly logical code, quite similar, in ... sysvinit startup scripts are on the far edge of what Bash ...
    (Debian-User)
  • Re: Bash usage: was implicit linkage
    ... I agree that shell scripts are simplistic and not meant for fancy programs although it could be done, ... I'm positive you could have written this shellscript without ... wrote some useful code in that language for my job as an engineer. ... BASH scripts are written in perfectly logical code, quite similar, in ...
    (Debian-User)
  • Re: [opensuse] Easy GUI or ncurses libraries/templates for kde3 or cli?
    ... I have a number of BASH scripts that I would like to develop a menu to display ... Glade + Perl could be alternative to Johns suggestion. ... Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org ...
    (SuSE)
  • Re: [opensuse] Easy GUI or ncurses libraries/templates for kde3 or cli?
    ... I have a number of BASH scripts that I would like to develop a menu to display ... Glade + Perl could be alternative to Johns suggestion. ... Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org ...
    (SuSE)