Alternative login shells [was Re: Shell script problem]
Tony Arnold
tony.arnold at manchester.ac.uk
Tue Mar 2 18:28:38 UTC 2010
Steve,
Steve Flynn wrote:
> 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.
ksh is in /etc/shells and typing ksh on karmic gives me the following:
$ ksh
The program 'ksh' can be found in the following packages:
* pdksh
* zsh
* ksh
* mksh
Try: sudo apt-get install <selected package>
ksh: command not found
HTH.
Regards,
Tony.
--
Tony Arnold, Tel: +44 (0) 161 275 6093
Head of IT Security, Fax: +44 (0) 870 136 1004
University of Manchester, Mob: +44 (0) 773 330 0039
Manchester M13 9PL. Email: tony.arnold at manchester.ac.uk
More information about the ubuntu-users
mailing list