I am trying to get a specific attribute from a line that is returned from the join command. My code to gunzip two files (without saving to disk) and then do a join on them is:
join <(gunzip -c fileA.gz) <(gunzip -c fileB.gz) -t $'|'
The -t $'|' is because the *.gz files are delimited by '|' instead of whitespace. I can use:
awk 'BEGIN {FS="|"};{print $1}'
To get the first field on each line normally, but I'm unsure if join is outputting the returned matches as a batch or per line... if it's per line how can I pause it to grab that first attribute and do a comparison (such as whether to continue looking at more lines)?
Any advice is appreciated.