Skip to content

Instantly share code, notes, and snippets.

@dardo82
Created October 11, 2014 05:16
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 dardo82/156c3bade2dd1e7fedd4 to your computer and use it in GitHub Desktop.
Save dardo82/156c3bade2dd1e7fedd4 to your computer and use it in GitHub Desktop.
First N italian words
#! /usr/bin/env gawk -f
BEGIN {
RS="==="
}
NR<8 && /\[\[|\]\]/ {
gsub (/\[|\]/,"")
for (i=1; i<=n; i++) \
m[i,NR]=$i
}
END {
for (i=1; i<=n; i++) \
for (j=1; j<=NR; j++) \
a[(i-1)*n+j]=m[i,j]
asort (a)
for (e in a) \
if (length (a[e]) >1) \
print a[e]
}
@dardo82
Copy link
Author

dardo82 commented Oct 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment