re: Why ${1+"$@"} is used in shell script VIEW POST

FULL DISCUSSION
 

This was a great read! I hadn't seen ${1+"$@"} before so this was a fun thing to learn!

It's interesting that it's not just a historical thing and also affects more recent versions of BASH as well!

I'll definitely at least think about this and decide which to use next time I am writing a BASH script that may or may not take arguments!

code of conduct - report abuse