Bash file input

Send Snippet To: Save this snippet to Code Collector Pro -- view all scarlet's snippets
language: Bash
license: Other

Code for Snippet:

while read -r fName lName empID; do
  # Only print the last name (second column)
  printf '%s\n' "$empID"
done < "$file"
comments powered by Disqus


Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 14
Date Added: 2017-05-23 20:35:44
Last Modified: 2017-11-27 17:53:31

Web Analytics