[TxMt] TM_USERNAME is null on Leopard

Grant Hollingworth grant at antiflux.org
Thu Nov 29 18:48:01 UTC 2007

Excerpts from Robin Houston's message of Thu Nov 29 13:19:21 -0500 2007:
>   perl -le 'print +(getpwuid $<)[6]'
> is portable and concise (and not likely to break when Apple change
> their bizarre tool in yet another incompatible way).

There's also the slightly longer but slightly clearer Ruby equivalent:

ruby -retc -e 'puts Etc.getpwuid.gecos'

More information about the textmate mailing list