Re: exec ./configure ${1+"$@"}
Sami Dalouche <samid@ifrance.com> writes:
> I've seen this line in the dh_configure file of the mutt package and I'm
> asking some questions about this :
>
> 1 ) Is the exec necessary ? What does it stand for ?
it terminates the current shell and executes the command instead. If
the command is the last in a script, this saves a little memory.
> 2 ) What's the ${1+"$@"}
> the ${} means that it will be replaced by the output of the command
> inside but what's the 1+"$@" ?
${} means parameter expansion, not command execution. "1" is the first
argument. "@" are all arguments. the "+" in between specifies to use
the latter if the former is unset.
BTW, You can find all this in the manpages (man exec, man sh).
Falk
Reply to: