Sunday, March 2, 2008

Linux shell one-liners

There is a great blog on shell one-liners and other linux topics: linux.dsplabs.com.au

One word of caution though: many of these one-liners use special characters, which many shells treat differently. If you use a visual shell like Midnight Commander then you will most certainly be in trouble (scripts WILL misbehave). Use bare bash to get better results.

There also have been locale related bugs in interpreters resulting in incorrect execution. When that happens, try experimenting with LC_ALL=C or LC_ALL=en_US.utf8 etc.