Re: system() on solaris 8 : how to change shell invocated for ksh?

From: Ed Morton (morton_at_lsupcaemnt.com)
Date: 11/09/05


Date: Wed, 09 Nov 2005 09:06:19 -0600


styx wrote:

> Hello!
>
> I'm running an nawk script on solaris 8, and I have a little problem :
> the script shell I want to be started with a system() instruction is a
> ksh one... So how can I do to change the shell process invocated from
> sh to ksh? In system() and standards page I read this:
>
> Utilities
> If the behavior required by POSIX.2, POSIX.2a, XPG4, SUS, or
> SUSv2 conflicts with historical Solaris utility behavior,
> the original Solaris version of the utility is unchanged; a
> new version that is standard-conforming has been provided in
> /usr/xpg4/bin. For applications wishing to take advantage of
> POSIX.2, POSIX.2a, XPG4, SUS, or SUSv2 features, the PATH
> (sh or ksh) or path (csh) environment variables should be
> set with /usr/xpg4/bin preceding any other directories in
> which utilities specified by those specifications are
> found, such as /bin, /usr/bin, /usr/ucb, and /usr/ccs/bin.
>
>
> ..but it seems to be not enough :(
>
> Thx to you
>
> PS:sorry for my poor english ;)
>

This is a shell question, not an awk one so it belongs in
comp.unix.shell. Crossposting and setting followups.

        Ed.



Relevant Pages

  • Re: Add user in Unix from command Line
    ... This really only affects the login shell for root -- once logged in as ... Some are other shell scripts, some are .c and .h files, some are various ... And now I just plain do not use other shells while root on sco boxes, ... For a few years I used to change roots login shell to ksh, ...
    (comp.unix.sco.misc)
  • Re: [Long] about ksh93 (Was: Bourne Shell Programming on Windows)
    ... :>: Are you saying that David Korn is an unitiated or ignorant ksh ... :> won't be called in a script. ... :> in every shell. ... that should be teached in every shell programming book. ...
    (comp.unix.shell)
  • Re: [Long] about ksh93 (Was: Bourne Shell Programming on Windows)
    ... Are you saying that David Korn is an unitiated or ignorant ksh ... > You provided one obscure example that does not occur in scripts. ... > in every shell. ... that should be teached in every shell programming book. ...
    (comp.unix.shell)
  • Re: [Long] about ksh93 (Was: Bourne Shell Programming on Windows)
    ... :> Korn Shell 93 ROCKS! ... I consider ksh and especially ... ksh93 one of the worst shell ever written, and especilly, its claim to ... But this is a shell feature, not a shell programming feature. ...
    (comp.unix.shell)
  • Re: Installing ksh from AT&T
    ... on UNIX that uses the Korn shell, ... ksh from AT&Ts, but, being a UNIX newbie, I am not sure where to put the ... Also sh is really the POSIX mode of bash. ... Ignore Ctrl-D at the command prompt. ...
    (comp.sys.mac.apps)