If you knew that you wanted to learn 10 spoken languages, it would probably be helpful to take a course in linguistics first. Or maybe to have a linguistics course after learning your first or second language. And if the languages are related, it would help to know something about the linguistics of that group of languages in particular. For example, if you wanted to learn several Romance languages, it might be worthwhile to learn at least some Latin first, even if Latin isn’t on the list of languages you want to learn.
In order to become fluent in using the Unix (Linux) command line, you need to learn a dozen related languages. Fortunately none of these languages are anywhere near as large as a spoken language, but there are several of them. Regular expressions, for example, are a pattern description language. You can think of vim as a language. And of course programming languages like sed
and awk
are languages.
As you use various command line utilities you notice similarities between them. Some tool history is fairly well known. For example, it’s well known that grep
takes its name from the g/re/p
command in ed
, and that grep
was created by modifying the ed
source code. The history of sed
is similar. The line editor ed
is a common ancestor of grep
, sed
, and vi
, which explains a lot of the similarity between these tools.
There is a large amount of preserved Unix history, but what I have in mind is more linguistics than history. History often accounts for the similarities in syntax, but I’m primarily interested in the similarities themselves rather than the history. A semi-fictional history might be more useful than an accurate history. “This isn’t exactly how things came about, but you could imagine …”
I’ve seen bits and pieces of what I imagine would comprise a course in Unix linguistics. For example, there is a section in the book sed & awk entitled “Awk, by Sed and Grep, out of Ed.”
I’ve used Emacs since college, but I’m learning how to get by in vi
. Part of my motivation is to be able to log into a client’s Linux box and be productive without being able to install or configure anything. Although I hardly know anything about vi
at this point, I can tell right away that vi
has more syntactic similarity to the rest of the Unix ecosystem than Emacs does.
It would be really nice to have a book with a title like “vi
for people who have used sed
, grep
, and less
.” Or even better, a tutor who could relate what I don’t know to what I do know. Someone like my Greek professor.
I took one semester of classical Greek in college. The professor, William Nethercut, was amazing. At the beginning of the semester he asked each student what languages they had studied, and customized the rest of the course accordingly. “This feature of Greek is like that feature in French, Susan. And like this feature of Latin, Mike.” I was impressed by his erudition in languages, but even more impressed with his thoughtfulness in relating to each of us individually. If Dr. Nethercut taught a class in the Unix ecosystem, he could say “So, you know this set of tools and want to learn that set of tools. You’ll find that the syntax of this is similar to the syntax of that, but watch out for this difference.”
Could ChatGPT be the tutor you’re looking for?