bash question
Tom Metro
tmetro-blu-5a1Jt6qxUNc at public.gmane.org
Sun Jan 4 13:06:56 EST 2009
Ben Eisenbraun wrote:
> $ head -n 1 /etc/gdm/Xsession && grep '\.profile' /etc/gdm/Xsession
> #!/bin/sh
> # First read /etc/profile and .profile
> test -f "$HOME/.profile" && . "$HOME/.profile"
That explains the inconsistency. Looks to me like a bug introduced by a
short sighted hack. It's presumptuous to assume the user is running a
bash family shell. I recommend that the original poster file a bug about
this with Ubuntu.
Jerry Feldman wrote:
> Note that on Linux when /bin/sh is symlinked to bash or dash, the shell
> looks at how it was invoked, and probably has a switch to enable or
> disable some features.
> ...
> This is one of the very nice features of Unix® and Linux in that the
> first argument to any program contains the command it was executed under
You can access the name of the executable under Windows just the same
(as ARGV[0]), but the technique never became popular there due to the
slow adoption of links.
-Tom
--
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
More information about the Discuss
mailing list