Skip to main content
added 12 characters in body
Source Link

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 (see comments below)
  • you avoid dupes with sort -u
  • you leverage resource usage with parallel (or xargs -l1)

Other approach of interest, piloted by awk:

awk -F'\t' '$3==76 && !seen[$1,$2]++ {
  print $1 FS $2 | "parallel""parallel ./build.oct"
}' ../benchmark/*/labels.txt
  • reuse input field separator FS instead of literal
  • dupes are discarded using an array of counters
  • you learn piping to awk subprocess

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 (see comments below)
  • you avoid dupes with sort -u
  • you leverage resource usage with parallel (or xargs -l1)

Other approach of interest, piloted by awk:

awk -F'\t' '$3==76 && !seen[$1,$2]++ {
  print $1 FS $2 | "parallel"
}' ../benchmark/*/labels.txt
  • reuse input field separator FS instead of literal
  • dupes are discarded using an array of counters
  • you learn piping to awk subprocess

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 (see comments below)
  • you avoid dupes with sort -u
  • you leverage resource usage with parallel (or xargs -l1)

Other approach of interest, piloted by awk:

awk -F'\t' '$3==76 && !seen[$1,$2]++ {
  print $1 FS $2 | "parallel ./build.oct"
}' ../benchmark/*/labels.txt
  • reuse input field separator FS instead of literal
  • dupes are discarded using an array of counters
  • you learn piping to awk subprocess
added 1 character in body
Source Link

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 (see comments below)
  • you avoid doublesdupes with sort -u
  • you leverage resource usage with parallel (or xargs -l1)

Other approach of interest, piloted by awk:

awk -F'\t' '$3==76 && !seen[$1,$2]++ {
  print $1 FS $2 | "sort -u | parallel""parallel"
}' ../benchmark/*/labels.txt
  • reuse input field separator FS instead of literal
  • dupes are discarded using an array of counters
  • you learn piping to awk subprocess

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

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 (see comments below)
  • you avoid dupes with sort -u
  • you leverage resource usage with parallel (or xargs -l1)

Other approach of interest, piloted by awk:

awk -F'\t' '$3==76 && !seen[$1,$2]++ {
  print $1 FS $2 | "parallel"
}' ../benchmark/*/labels.txt
  • reuse input field separator FS instead of literal
  • dupes are discarded using an array of counters
  • you learn piping to awk subprocess
added 1 character in body
Source Link

Consider this:

cat ../benchmark/*/labels.txt |
while IFS='\t'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

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

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
added 206 characters in body
Source Link
Loading
Source Link
Loading