Skip to main content
2 of 5
added 206 characters in body

Consider this:

cat ../benchmark/*/labels.txt |
while IFS='\t' read P1 P2 P3 ; do
  [[ $P3 == 76 ]] && echo $P1 $P2
done |
sort -u |
parallel ./build.oct
  • you save awk subprocess with readline built-in parser
  • you avoid doubles with sort -u
  • you leverage resource usage with parallel (or xargs -l1)

Other approach of interest, piloted by awk:

awk -F'\t' '$3==76{
  print $1 FS $2 | "sort -u | parallel"
}' ../benchmark/*/labels.txt
  • you learn piping to awk subprocess