bug-bash
[Top][All Lists]
Advanced

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

Re: set function and special builtin set


From: Benno Schulenberg
Subject: Re: set function and special builtin set
Date: Fri, 18 May 2007 22:59:22 +0200
User-agent: KMail/1.9.6

Paul Jarc wrote:
> Benno Schulenberg <address@hidden> wrote:
> > Andreas Schwab wrote:
> >><http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_ch
> >>ap02.html#tag_02_09_01_01>:
> >>
> >>     If a simple command results in a command name and an
> >> optional list of arguments, [...]
> >
> > But set() is not a simple command, it is a function definition,
> > no?
>
> Right, so defining the function should work, but calling it
> should not.

Ah!  Okay.

$ export POSIXLY_CORRECT=yes
$ set() { echo "My set $@" ;}
$ set params
$ unset POSIXLY_CORRECT
$ set params
My set params

Benno




reply via email to

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