My Tech Notes
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
‹
›
Home
View web version
No comments:
Post a Comment