My Tech Notes
Search This Blog
Shell script: set delimiter and read line from file
while IFS=$'\t' read col1 col2; do echo "column 1: ${col1}" done < /path/to/input.txt
The above code read from tab delimited text file.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment