Five years ago I wrote a little blurb called Death of the command line. As it happened, that article was misunderstood by many who read it - I don't know if it was my fault or theirs, but somehow many readers ended up thinking I was either predicting the demise of CLI's (Command Line Interfaces) or hoping for that demise or both.
Nothing could have been farther from the truth. I remain a big fan of CLI's and use them daily. And yet, just five years later and still at risk of angering yet another batch of folk who won't read carefully, I'm going to suggest that predicting the death of the CLI may not be such a bad bet after all.
What triggered this was that I happened to be doing a bit of editing to another article - Using the shell (Terminal) in Mac OS X. As I made some corrections, I thought "Nobody cares about this nowadays".
That's not entirely true. That particular page still gets five thousand or more visitors every month and has even been "plussed" a few times, so obviously a few people still care. On the other hand, in the greater world of folks I run into daily, nobody uses the CLI and most don't even know that they could.
But why would you use the CLI?
That's the kind of question that makes people like me sputter a bit. "Because it's faster!", we exclaim. "Because you can do things that you can't even do in the GUI!", we add (GUI: Graphical User Interface).
That might be true. But does it matter?
Let's look at faster. An example I often use is simple math.
[email protected]:~$ bc
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
80 * 1.25
That is so much faster than clicking numbers on a GUI calculator, I'd say, and I'd add that actually, it's even faster, because I leave "bc" running in a Terminal tab on my Mac.
But.. it really isn't faster. In fact, if I already have Calculator up and running, I can switch to that and type exactly the same keystrokes, minus the spaces, and get an answer just as quickly. So "faster" doesn't really hold true.
Ahh, but what about cut and paste? There's the rub - you can't highlight a number in Calculator and copy it to paste it elsewhere!
Well, that's this particular calculator and actually, it will let you copy and paste results - it just dispenses with any need to select them with your mouse. Just use the Copy in the Edit menu or the command line equivalent and it's done.
Maybe that was a bad example? Sure, I can come up with specific things that are faster in the shell, but the problem is that all of them are somewhat esoteric or special case. They are either things that you'd seldom or never do or things that you COULD easily do in the GUI if you arranged things ahead of time to make the task easier.
As a proponent of CLI, I'd argue that the flexibility is an important point: the CLI lets me quickly do things I did not know I was going to need to do. That's true,but do those situations come up often enough to make it worth while for the non-shell savvy user to learn all that they'd need to learn? After all, those unusual situations usually require more than a casual knowledge of shell commands and scripting - there's a learning curve that just might not be worth the effort to climb!
I and anyone else defending CLI's will often invoke wildcards as an example of CLI power. With judicious use of wildcards, you can accomplish things very quickly that could definitely take much longer in the GUI.
However, most examples I could give would be contrived, esoteric or incomplete. Are your or I likely to need to copy or remove files that match "*[6-9]+.*" while avoiding all others? Sure, very rarely such needs do come up and the GUI user is stuck with laborious work that requires only seconds for me to accomplish. But really, how often is that? Is it often enough to justify that learning curve? Even I don't think it would be and if I didn't already have the knowledge, I might not bother to obtain it!
The other part of this is the "incomplete". When I do find myself needing esoteric wildcards, it's the copying or removing is only one part of a bigger project, and that larger need usually involves much more difficult scripting or even - gasp - real programming. Again, that type of work is not something most people ever do.
Is there really any reason to learn CLI?
I'm reminded of my own efforts to learn Spanish. I'd like to learn it, and I have made some efforts in that direction, but I don't have any real need to do so. Like the examples of shell commands I gave above, knowing some Spanish could come in handy now and then, but I have no strong reason to climb that particular ramp. I lack incentive other than intellectual curiosity.
For most computer users, learning shell commands or, even worse, shell scripting, fails to provide enough tangible reward to pay for the time and effort involved. Believe me, it bothers me greatly to say that. Emotionally, I rebel against that thought: it can't be true, it must not be true!
Yet it almost certainly is true.
Please, please, please tell me that I am wrong. Demonstrate the flaws in my logic, show me the errors of my ways. Convince me that my emotional response is the right one; show me why computer users should learn command line basics.
You might convince me, but I have real doubts that you can. As to convincing the millions upon millions of those who have never used a shell at all, I'll bet even the most adamant of shell proselytizers will admit defeat on that challenge.
Given this apparent truth, will tools like Mac OS X Terminal and Linux Konsole slowly get hidden away much as the programmer tools are now? Will they require a special installation? Honestly, if Apple did that, it wouldn't surprise me at all. I'd expect Linux to resist de-shelling quite a bit longer, but even there the CLI may drift into insignificance.
That will upset me, even though I will understand why it was done.
Got something to add? Send me email.
Increase ad revenue 50-250% with Ezoic
More Articles by Anthony Lawrence
Find me on Google+
© 2011-09-10 Anthony Lawrence