Original computing articles by a systems administrator

Category Archives: Scripting

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

Getting Command Line Columns to Line up with Python

I created a solution for a program I am writing that makes columns line up when outputted to the command line. I am new to Python, and am hoping I might get some input on this topic. In the text file that the program reads, the fields (columns) are delimited by ‘$’ and the records… Continue Reading