igli 1177620005 learn myCmd=(cmd -i "with $strange params" "$file"); while read -r l; do echo Line $((i++))": $l"; done < <("${myCmd[@]}") # use $ to evaluate not eval, array for complex cmds, ((..)) for arithmetic and <(..) for process substitution. Try this in a terminal now: while read -r l; do echo Line $((i++))": $l"; done