Alternative login shells [was Re: Shell script problem]

Steve Flynn anothermindbomb at gmail.com
Tue Mar 2 18:21:46 UTC 2010


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

On 02/03/10 08:37, Patton Echols wrote:
> If you call a script with sh -x ./<scriptname>
> 
> It will be used with the "sh" interpreter instead of "bash" regardless 
> of the first line of the file!  If you want to do the same with bash, 
> then it is $bash -x ./myscript.sh

Alternatively, use a "set -x" command inside the shell script... I
/believe/ most shells will honour a set -x command. That way you run in
the intended shell with tracing turned on.

As I was testing to see which shells supported the set -x command, I
find that on this Lucid installation, /etc/shells lists the following
shells as being available:

# /etc/shells: valid login shells
/bin/csh
/usr/bin/es
/usr/bin/ksh
/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/bin/sh
/usr/bin/screen
/bin/dash
/bin/bash
/bin/rbash
/bin/false

However, I can't find any trace of ksh installed on this (default)
system. Can anyone confirm that the same is true in Karmic for me please
and I'll raise a bug if there's not already one there.

- -- 
Steve Flynn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuNVzoACgkQpOzvLkUb86B/JgCeO4FUSSnig3OS3NWqE4FFzRVb
mmUAoJlGxQN5WBXiVZS+NKFKHPuPFnoR
=yl5s
-----END PGP SIGNATURE-----




More information about the ubuntu-users mailing list