bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: doubts on awk possibilities


From: Stephane Chazelas
Subject: Re: doubts on awk possibilities
Date: Wed, 16 May 2007 19:37:46 +0100
User-agent: Mutt/1.5.6i

On Wed, May 16, 2007 at 08:40:42PM +0300, Eli Zaretskii wrote:
> > From: Juergen Kahrs <address@hidden>
> > Date: Wed, 16 May 2007 08:21:18 +0200
> > 
> > > Hi, is it possible to call another awk program from one?
> > 
> > Use the system() function of AWK.
> > It invokes a standard Bourne shell (sh).
> 
> Actually, it invokes the system shell.  On Posix systems, this is
> generally the Bourne shell (or its emulation), but on Windows, for
> example, it's something else.
[...]

Well, if a POSIX awk on a POSIX system calls the Bourne shell,
then that's a bug (/usr/xpg4/bin/awk on old versions of Solaris
are known to have that bug) given that the Bourne shell is not a
POSIX shell.

The Bourne shell is a shell from the 70s that is hardly found
anymore nowadays (mostly only on Solaris and Tru64).

sh nowadays is one implementation or the other (bash, ksh, zsh,
ash derivative...) of an interpreter of the sh language
as specified by POSIX.

On Unix systems, sh is even conformant to the Unix specification
of sh which is a superset of the POSIX specification. The GNU
shell (bash) is POSIX (seeks POSIX compatibility) but not Unix
(at least by default).

On GNU systems, GNU awk's system() or print | cmd is likely to
call the GNU shell.

-- 
Stéphane




reply via email to

[Prev in Thread] Current Thread [Next in Thread]