i18n and Bash scripting

One of the first things a programmer learns, one of a sysadmin’s main tools and working environments is known as the Bourne Again Shell, or bash.

Bash is a low level programming environment, similar to DOS on the Windows OS. Bash comes with Mac OSX (Utilities->terminal) as well, but like DOS, is rarely used by most people. Within bash it is possible to do very complicated tasks very quickly by stringing together a collection of smaller tools like findingsorting, slicing and searching to automate the task at hand. The Flossmanuals have an excellent introduction to the command line (which is usually, but not always, bash) and author Neal Stephenson wrote an excellent piece called In the Beginning was the Command Line (it’s getting long in the tooth, but is well worth the effort).

Louis Iacona at the Linux Journal gives a great summary on how to Internationalise our bash scripts. As he notes, most other languages have well developed documentation regarding i18n/L10n – but not bash. He offers no reason why, although I would suggest it’s due to age and that most people use it for small repetitive tasks rather than complex software engineering.

The article begins with a rudimentary intro to i18n/L10n but the meat is further down, where he steps through the processes and commands that are used to i18n a bash script.

While it’s not really ground breaking, after 23 years, bash deserves an i18n howto. A great contribution.

Leave a Reply

Your email address will not be published. Required fields are marked *

4 × five =