Skip to content

Instantly share code, notes, and snippets.

@iNecas
Last active August 15, 2018 13:46
Show Gist options
  • Save iNecas/66125191678a940db2806f9ad77d8ff8 to your computer and use it in GitHub Desktop.
Save iNecas/66125191678a940db2806f9ad77d8ff8 to your computer and use it in GitHub Desktop.
Difference between $* and "$@"
./test_args.sh "one two" three
with $*
["one", "two", "three"]
with "$@"
["one two", "three"]
#!/usr/bin/env ruby
p ARGV
#!/usr/bin/env bash
echo 'with $*'
./test_args.rb $*
echo 'with "$@"'
./test_args.rb "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment