Timeline for What does ${1+"$@"} mean in a shell script, and how does it differ from "$@"?
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 14, 2016 at 1:35 | history | edited | user79743 | CC BY-SA 3.0 | added 2 characters in body |
| Jan 7, 2015 at 9:40 | comment | added | Stéphane Chazelas | No, ${1:+"$@"} would expand to no argument if $1 was empty. You want ${1+"$@"}. Basically you have it reversed. | |
| Jan 7, 2015 at 8:08 | comment | added | törzsmókus | this seems to apply only to Bourne shell and not for any POSIX-conformant sh implementation (see other answer). | |
| Mar 19, 2013 at 20:35 | history | answered | Arcege | CC BY-SA 3.0 |