Tag Archives: shell

A 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 mode of … Continue reading

Posted in shell, tools | Tagged , , | Leave a comment

Maven: Discovering Dependency Conflicts

Among other things, Maven’s dependency plugin displays the result of Maven’s dependency resolution mechanism. The output of the dependency:tree goal makes it easy to see where transitive dependencies come from. This week I discovered that recent versions of the plugin … Continue reading

Posted in java | Tagged , , | 2 Comments

Quick 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 ways to achieve … Continue reading

Posted in shell | Tagged , , , | Leave a comment

Quick Tip #5: Navigating in Source Trees

I often move around in checked out Subversion or Git source trees on a Bash command line. Directory structures tend to get quite deep (especially in Java projects), so one problem keeps coming up frequently: Changing back to the base … Continue reading

Posted in shell | Tagged , , | Leave a comment

Bourne 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 V7 manuals from 1978. Among other … Continue reading

Posted in shell | Tagged , | 3 Comments

Scripts 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 from the weird category, but I’ve … Continue reading

Posted in shell | Tagged , , | 2 Comments

Quick 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 as the file gets larger and your system has to swap, performance degrades significantly. Even GNU sort … Continue reading

Posted in shell | Tagged , , , , | 2 Comments