Prune unwanted columns

This commit is contained in:
Robert Bendun 2023-03-18 17:00:48 +01:00
parent 1c67e03c7b
commit 7aa6c668ee

View File

@ -1,3 +1,6 @@
languages.pruned.tsv: languages.original.tsv columns.user.tsv
bash -c "cut -f`grep '^y' columns.user.tsv | cut -f2 | paste -sd ','` $< >$@"
# Allow user to mark in which columns is interested
columns.user.tsv: columns.pruned.tsv
if [ -f $@ ]; then touch $@; else awk 'NR==1{ printf("Keep\t"); print } NR>1{printf("n\t"); print}' $< >$@; fi