I have a Bash file called test.sh:
#!/bin/bash
arr=([email protected] [email protected])
ruby testScript.rb $arr
And here's testScript.rb:
ARGV.each{|a| p a}
When I run ./test.sh in the terminal, I get this output:
"[email protected]"
I want my Ruby script to loop through all elements in the Bash array variable $arr. How do I fix my code to do this?