fork download
  1. #!/bin/bash
  2. # your code goes here
  3.  
  4. generate_sample() {
  5. printf '%s\t%s\n' \
  6. fruits vegetables \
  7. apples cucumbers \
  8. oranges squash
  9. }
  10.  
  11. while IFS=$'\t' read -r col1 rest; do
  12. echo Line
  13. echo "$col1"
  14. done < <(generate_sample)
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
Line
fruits
Line
apples
Line
oranges