Re: Which shell interpreter has priority: The declared, the current or calling?

From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 02/18/05


Date: 18 Feb 2005 07:01:19 GMT

On Fri, 18 Feb 2005 at 06:46 GMT, Matt Benson wrote:
> Imagine I have the three shells csh, ksh and bash.
> Currently I am working under shell a and call from the command line
> a script with shebang "#!/bin/b" by shell c
>
> e.g.:
>
> csh>ksh myscript.sh
>
> where myscript.sh starts
>
> #!/usr/local/bin/bash
>
> By which shell/script interpreter is the script executed?

   It will be interpreted by ksh, since myscript.sh is an argument to
   a command, not a command in itself.

-- 
    Chris F.A. Johnson                  http://cfaj.freeshell.org/shell
    ===================================================================
    My code (if any) in this post is copyright 2005, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License


Relevant Pages

  • Re: Set -o Vi Causes core dump and segmentation fault
    ... set -o vi command and nothing happened. ... different from the parent shell's editor it causes this segmentation ... Our parent shell is bash and the editor is set (by /etc/ ... If you then spawn a ksh subshell,run set -o vi, ...
    (linux.redhat)
  • Re: Set -o Vi Causes core dump and segmentation fault
    ... some kernel changes are made. ... set -o vi command and nothing happened. ... different from the parent shell's editor it causes this segmentation ... If you then spawn a ksh subshell,run set -o vi, ...
    (linux.redhat)
  • Re: Set -o Vi Causes core dump and segmentation fault
    ... set -o vi command and nothing happened. ... After a day of divide and conquer on 18 scripts we have figured ... different from the parent shell's editor it causes this segmentation ... If you then spawn a ksh subshell,run set -o vi, ...
    (linux.redhat)
  • Re: getting current directory
    ... Not if /bin/sh is a symlink to zsh (in which case zsh emulates ... /usr/xpg4 in turn certainly is a Solaris specific path. ... >> To work around a bug in most kshs. ... But "command" itself happens to fork and exec a command, ...
    (comp.unix.shell)
  • Re: Aliasing cd to a function under ksh88
    ... So far as I know, ksh expands variables in PS1 when printing it, so you ... ..profile is sourced by a login shell, ...
    (comp.unix.shell)