I was getting errors passing in a command and when I put quotes around that things worked just fine. Just curious how that works.
Asked
Active
Viewed 28 times
0
-
Quote all the variables until it does not work as expected, not the other way around. – Jetchisel Dec 03 '22 at 13:56
1 Answers
0
Double quotes around $@ (and similarly, ${array[@]}) prevents globbing and word splitting of individual elements, while still expanding to multiple separate arguments.

Vasyl Herman
- 414
- 2
- 11