Created
October 11, 2014 05:16
-
-
Save dardo82/156c3bade2dd1e7fedd4 to your computer and use it in GitHub Desktop.
First N italian words
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -s "http://it.wiktionary.org/w/index.php?title=Utente:.mau./Le_mille_parole_pi%C3%B9_comuni&action=raw" | gawk -v n="42" -f parole.awk