Skip to content

Instantly share code, notes, and snippets.

@eliottha
Created October 15, 2021 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliottha/d5f3e74283b822dbb52b2edb2f850454 to your computer and use it in GitHub Desktop.
Save eliottha/d5f3e74283b822dbb52b2edb2f850454 to your computer and use it in GitHub Desktop.
{
for(i = 1; i < NF; i++) {
for(j = i+1; j <= NF; j++) {
if(length(a[$i,$j]) == 0) {
if(length(a[$j,$i]) > 0) {
next;
}
a[$i,$j]=$i" "$j;
print a[$i,$j];
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment