Monday, September 29, 2008

Why Programmers Love Linux, Or How I Learned to Stop Worrying and Love Text Files

Why is it that Programmers love Linux? Is it the power of the command line? The responsiveness of the systems compared to a bloated Windows interface? The programming tools that are standard on a Linux system? I submit the power of Linux is in large part due to the UNIX philosophy that "everything is a text file". The standard Linux shell on most systems is ready to work with text files immediately. Utilities such a 'wc', 'sed' and 'awk" are workhorse tools I use daily. Much of these powerful utilities' features has been absorbed by and as a consequence made more internally consistent by the Perl scripting language. For larger applications, Perl is great, but the tools available from the command line are there for immediate use and bypass the edit-run-debug cycle of scripting.

I will futher pursue the topic of text file manipulation in later posts, as this is a fundamental part of what Programmers do.

2 comments:

Unknown said...

Sed one-liners can be a source of great joy. :) Along the same lines, it's really nice to be able to do:

for x in *.txt; do (whatever); done

etc.

Note: I do not intend to start a bash vs. csh flame war. I'm sure that csh has its uses; I've just never taken the time to investigate them. :)

hexhead said...

I agree! That little bash loop has been a lifesaver. Just used it a few minutes ago :)