Created
June 23, 2020 09:46
-
-
Save piero-g/cb82601ec863d6c715c6b4ce5e07a6de to your computer and use it in GitHub Desktop.
basic TSV parser in bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input=${1} | |
# skip first row, read tsv | |
sed 1d $input | while IFS=$'\t' read -r -a arry | |
do | |
echo "${arry[0]}" | |
echo "${arry[1]}" | |
echo "${arry[2]}" | |
# ad libitum... | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment