0

I was getting errors passing in a command and when I put quotes around that things worked just fine. Just curious how that works.

Dr. Chocolate
  • 2,043
  • 4
  • 25
  • 45

1 Answers1

0

Double quotes around $@ (and similarly, ${array[@]}) prevents globbing and word splitting of individual elements, while still expanding to multiple separate arguments.

See: https://github.com/koalaman/shellcheck/wiki/SC2068

Vasyl Herman
  • 414
  • 2
  • 11