Original computing articles by a systems administrator

Category Archives: Bash

How to Cross Compile the Bash shell for Android 1.5

Introduction: I just got a new G1 Android phone, and since it runs Linux I just had to get the Bash shell running on it, the built in shell would just not do.  I do need my tab completion after all. Cross compilation is the process of compiling software on one platform that is meant… Continue Reading

Bash Snippet: Sort Files by Part of the Filename

The Situation: I have several directories with various GUN/Linux e-books in them. The names of the e-books have the publication date in them, but not in the same place. What I wanted to do was get a list of the books sorted by the publication date. My Solution: The solution I used was to create… Continue Reading

Quick Tip: Thinking about Bash Redirection and File Descriptors

A common question that comes up from people new to bash scripting is: “How do I redirect standard error to standard out?” There are a few ways to write this but the clearest way in my opinion is “command 2>&1″. File descriptor 2 is standard error, and 1 is standard out. So “2>&1″ reads in… Continue Reading

Bash: Getting Command Line Columns to Line up

Update: David Harding pointed out in his comment to this post that the column utility does exactly this. Therefore, the following is really just an academic exercise. In my last post I showed how to get columns outputted in the command line to line up using python. In this post I am going to show… Continue Reading

Quick Tip: Thunderbird Email from the Command Line

Basics Thunderbird messages can be composed from the command line, and the syntax is pretty basic (field=’value’). For Example: admin@box:$ thunderbird –compose “to=’foo@bar.com,bar@foo.com’,subject=’nice tip’,attachment=’file:///home/admin/tip.txt’,body=’Check out this neat command line tip’” Caveats: Values don’t have to be in single quotes. However, if you have multiple values or characters that might be interpreted by Thunderbird, as actually… Continue Reading