Séimhiú

Bash Aliases

23 Aug 2015 » back to top

It’s been a while since I last posted here, and even longer since I actually wrote it. Recently I was playing around with bash, and made some aliases to change between the old Irish orthography which had lenition marks (punctum delens in Latin, ponc séimhithe in Irish) and the new romanized orthography which uses h to represent lenition instead.

I posted them to /r/Gaeilge a few days ago, and figured that I may as well throw them on this blog as well, since I haven’t really figured out what I should be writing about yet:

# ~/.bash_aliases
alias ponc2h="sed -e 's/\([bcdfgmpst]\)\xcc\x87/\1h/Ig'"
alias h2ponc="sed -e 's/\([bcdfgmpst]\)h/\1\xcc\x87/Ig'"

The only caveat with these is that they don’t convert from or to the precombined unicode characters. So they’re only good for text that you’ve written yourself when converting from the Old to the New orthography—though they should work fine going the other way.