Skip to content

Instantly share code, notes, and snippets.

@piero-g
Created June 23, 2020 09:46
Show Gist options
  • Save piero-g/cb82601ec863d6c715c6b4ce5e07a6de to your computer and use it in GitHub Desktop.
Save piero-g/cb82601ec863d6c715c6b4ce5e07a6de to your computer and use it in GitHub Desktop.
basic TSV parser in bash
#!/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