Controlling Firefox via Command Line
Mozilla-based browsers like Firefox have inherited a useful feature from the good old Netscape Navigator: Controlling a running browser instance via the command line. Using command line options, you...
View ArticleParsing Command Line Options in Shell Scripts
In programs written in C, command line argument parsing has always been done using the getopt(3) library function. This function has set the standards Linux/Unix users have come to expect from command...
View ArticleMap/Reduce in Python
My interest in Grid Computing over the last weeks begins to show. After reading the Google MapReduce paper, I tried my fingers on a client side toy problem. For formatting purposes, I was interested in...
View ArticleA Template for Python Unix Utilities
One of the most often read postings on this blog is the one about my getopts-enabled shell script template. So I figured, a similar template in Python would also be useful. Like the shell script, it’s...
View ArticleEee PC Wireless Troubles
Half a year ago, I bought an Asus Eee PC 1000HE netbook. The first thing I did was wiping Windows XP off the disk and installing Ubuntu Jaunty Netbook Remix. When I bought the netbook, I knew support...
View ArticleFun with Context Managers
Sometimes I need a simple stop watch in my Python scripts to find out how expensive my code is in wall clock time. The problem is trivial to solve, but I thought I’d give it a try using Python’s with...
View ArticleQuick Tip #4: Sorting Large Files
With traditional Unix sort(1), the size of the files you can sort is limited by the amount of available main memory. As soon the file get larger and your system has to swap, performance degrades...
View ArticleDelicious shutting down?
Yesterday, I was quite surprised when I head rumors that Delicious, my favorite link sharing site, is shutting down. According to their blog, they are looking for a way to continue the service outside...
View ArticleScripts That Just Don’t Work
Sometimes people ask for my help when their shell scripts don’t work. I’ve seen all kinds of problems, ranging from trivial to really, really weird. The one I’m describing in this article is definitely...
View ArticleBourne Shell Parameter Expansion
Classic Bourne Shell has a handy feature that many people don’t seem to know: Parameter Expansion. Stephen Bourne describes it in An Introduction to the UNIX Shell, which is part of the original Unix...
View ArticleBuilding a Web-Based Java API Search
From time to time I play with web technologies to keep up with recent developments. While I know my network protocols pretty well, I’m not a frontend developer so I’m pretty useless when it comes to...
View ArticleQuick Tip #6: Triggering Actions on File Close
Sometimes it’s useful to trigger an action after a file is closed. Suppose you started a lengthy download on your notebook and you want to suspend it as soon as the download is done. There are several...
View ArticleRemote-Controlling a Sonos Device Using Python
I couple of months ago I bought a Sonos Play:1, a pretty cool wireless speaker that comes with free controller apps for major platforms (Android, Windows etc.). To give the speaker access to my music...
View ArticleChecking Whether a Process Exists
On Linux/Unix systems, there’s occasionally the need to check whether a process is running. Some people use it for simple status checks or when building their own lifecycle scripts for startup and...
View ArticleA Quick Introduction to sed(1)
The sed(1) stream editor is one of the most powerful tools from the classic Unix tool box. It is a close cousin to the ed(1) command line editor and a descendant of the ex(1) editor, the command line...
View ArticleUsing Kubectl Printers and Plugins
Even though we have plenty of metrics and dashboards at work, I use the kubectl command line tool a lot for looking at resources and for troubleshooting. Because the defaults don’t always display the...
View Article