Question: In order to write a script that iterates through the files in a directory, which of the following could you use?

  1. `bash for i in $(ls); do ... done`
  2. `bash for $(ls); do ... done`
  3. `bash for i in $ls; do ... done`
  4. `bash for $ls; do ... done`

Answer: The correct answer of the above question is Option A:`bash for i in $(ls); do ... done`