Created
July 16, 2015 21:28
-
-
Save philippgeisler/6bc9e6b82c33c02baec3 to your computer and use it in GitHub Desktop.
interactively select a column from (here: tab-)seperated value data by its title (expected to be in 1st line) and see its values; expects a (tsv) file path as 1st and only argument; requires percol https://github.com/mooz/percol
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/sh | |
head -1 $1 | \ | |
tr "\t" "\n" | \ | |
cat -n | \ | |
percol | \ | |
awk '{print $1}' | \ | |
xargs -I c awk -v x=c 'BEGIN{FS="\t"}{print $x}' $1 | \ | |
less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment