view bin/hyphenate.fi @ 1976:f6a103332ffe

<ion> chmod 755 bin/hyphenate.fi; cat bin/hyphenate.fi
author HackBot
date Sat, 02 Feb 2013 11:48:48 +0000
parents 32e14ad1db51
children 7d0ce782d00c
line wrap: on
line source

#!/bin/sh
exec perl -CS -Mutf8 -pwe 'my$vow=qr/[aeiouyäö]/i;my$con=qr/[bcdfghjklmnpqrstvwxz]/i;1while s/($vow$con*)($con$vow)/$1-$2/g;1while s/ae|ao|ay|aä|aö|ea|eo|eä|eö|ia|io|iä|iö|oa|oe|oy|oä|oö|ua|ue|uy|uä|uö|ya|ye|yo|yu|yä|äa|äe|äo|äu|äö|öa|öe|öo|öu|öä/my@s=split"",$&;$s[0]."-".$s[1]/eg'