3 # Copyright © 2022 Nick Bowler
5 # Partial implementation of POSIX "join" command. No options are supported.
7 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
8 # This is free software: you are free to do what the fuck you want to.
9 # There is NO WARRANTY, to the extent permitted by law.
23 # Rewind RHS as we have duplicate keys in LHS.
31 if (advance_rhs() == 0)
41 } while ($1 == rhs[1]);
44 function advance_rhs(raw, rc)
46 rc = getline raw < file2;
54 function print_match(i)
57 for (i = 2; i in rhs; i++) {