Newlines

What do the text utilities on AIX have against following the manual and manipulating newlines properly? Is it just that AIX is from IBM, and IBM software is half-assed?

$ uname -a
AIX myhost 3 5 00C2D2804C00
$ echo " 1 2 3 4   5 2 1" | tr -s [:space:] '\n'
 1 2 3 4   5 2 1
$ echo " 1 2 3 4   5 2 1" | tr -s [:space:] '\012'
 1 2 3 4   5 2 1

$ echo " 1 2 3 4   5 2 1" | sed 's/ /\n/g'
n1n2n3n4nnn5n2n1

By properly, I of course mean “How GNU does it.”

$ uname -a
Linux myhost 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
$ echo " 1 2 3 4   5 2 1" | tr -s [:space:] '\n                                                                             '

1
2
3
4
5
2
1

$ echo " 1 2 3 4   5 2 1" | tr -s [:space:] '\012'

1
2
3
4
5
2
1
$ echo " 1 2 3 4   5 2 1" | sed 's/ /\n/g'

1
2
3
4


5
2
1

Turns out that tr(5) was not matching the class [:space:] or the class [:blank:], but would match and transform the single character ' ' (space). Still not sure WTF is up with sed(5). The simple solution to this problem, of course, is to avoid AIX.

Not Enough Time

We’ve been very busy with work over the past month, preparing for a release this past weekend, and so parts of my normal routine have slipped away, such as grooming and eating dinner with my family. One might almost think that I work for a start-up in which I have a great personal stake. Anyway, I now have a pile of newspapers on my desk. I will likely read the comics and editorials, then dispose of the rest. While I have a certain fondness for reading the news on paper, it’s become almost pointless.

What keeps the local paper relevant is local news, of which it does not have enough.