Programming Language Advice to My Daughter, Part 3: Shell Script *
Classic techniques remain effective.
In this “Programming Language Advice to My Daughter” series:
Part 1: Ruby
Part 2: C++
Part 3: Shell Script *
Part 4: Java
Part 5: Wrap-up and FAQ
A shell script is a computer program designed to be run by the Unix/Linux shell, such as the Bourne Again SHell (Bash).
A Story
Many years ago, I was working on a .NET project that required extracting a column of data from a CSV file. A senior .NET contractor confidently said, 'Easy—I’ll build a .NET application with a graphical user interface that lets the user select a CSV file, perform the extraction, and save the output to a file of their choice.' Several other .NET developers nodded in agreement. He went ahead and spent a few hours building it.
I was shocked to hear and see that because this is just a one-line shell script.
For example, to extract the year column in the following CSV file.
The one-line script is:
Keep reading with a 7-day free trial
Subscribe to The Agile Way to keep reading this post and get 7 days of free access to the full post archives.