fork download
  1. #!/bin/bash
  2. # your code goes here
  3.  
  4. myarr=( printf ' - %s\n' "first line" "second line" )
  5.  
  6. echo "Working Way:"
  7. "${myarr[@]}"
  8. echo
  9. echo "Broken Way 1:"
  10. ${myarr[@]}
  11. echo
  12. echo "Broken Way 2:"
  13. eval "${myarr[@]}"
Success #stdin #stdout 0.01s 5656KB
stdin
Standard input is empty
stdout
Working Way:
 - first line
 - second line

Broken Way 1:
-
Broken Way 2:
-