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
awksubprocess withreadlinebuilt-in parser - you avoid doubles with
sort -u - you leverage resource usage with
parallel(orxargs -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