Merge pull request #12 from ptomato/master

More portable awk script
This commit is contained in:
Dimitrij Mijoski 2016-11-19 02:13:51 +01:00 committed by GitHub
commit 726a506ef1
1 changed files with 12 additions and 6 deletions

18
lig.awk
View File

@ -24,14 +24,20 @@ c=b
c!=b { print c } c!=b { print c }
/f[1-9]?$/ { /f[1-9]?$/ {
print gensub("f[1-9]?$", "ff", "g", b); out=b; gsub("f[1-9]?$", "ff", out); print out
if (c!=b) print gensub("f[1-9]?$", "ff", "g", c); if (c!=b) {
out=c; gsub("f[1-9]?$", "ff", out); print out
}
print gensub("f[1-9]?$", "fi", "g", b); out=b; gsub("f[1-9]?$", "fi", out); print out
if (c!=b) print gensub("f[1-9]?$", "fi", "g", c); if (c!=b) {
out=c; gsub("f[1-9]?$", "fi", out); print out
}
print gensub("f[1-9]?$", "fl", "g", b); out=b; gsub("f[1-9]?$", "fl", out); print out
if (c!=b) print gensub("f[1-9]?$", "fl", "g", c); if (c!=b) {
out=c; gsub("f[1-9]?$", "fl", out); print out
}
} }