Using Perl on the Command Line

Jeff Terrell
July 5, 2019


I wrote this article circa 2006 on a personal website that is now defunct. I still use Perl on the command line frequently, so despite the fact that Perl (5) is passé these days, I think this content is worthwhile enough to republish.


Perl has become a very popular scripting and text-processing language, yet relatively few programmers and command-line geeks are aware of the usefulness of Perl from within an interactive, command-line interface. In this tutorial, I introduce several powerful command-line switches, including -e, -n, -p, -l, -a, and -F. I also demonstrate BEGIN{} and END{} blocks. I illustrate all new concepts with a variety of examples.

Continue reading →

Resources for Learning Clojure

Jeff Terrell
September 3, 2018

I'm suddenly finding myself in a situation where I need to help a lot of people get a crash-course in Clojure in preparation for a project we'll be doing this semester. Rather than prepare teaching materials myself, fun though that would be, I'll lean on the excellent resources already available. This post contains my current recommendations for how to learn Clojure.

Note: I'm assuming a prerequisite of some programming experience. I'm not sure how much of a hard prerequisite that is. If you have a sense of that, I'd be interested to hear what you think.

Install Clojure

Continue reading →

Advanced tips for the bash command-line

Jeff Terrell
August 16, 2018

I just published a screencast on advanced command-line tips from a short talk I gave last year. I try to keep my screencasts brisk to avoid wasting anybody's time, but I also understand some would prefer to have the content in a more skimmable format; hence this post.

Note that this is more an info-dump than a tutorial, so if any of these topics are unfamiliar, I suggest watching how I use them in the video.

My advanced bash/CLI tips:

Continue reading →

New Job! Professor of the Practice @ UNC-CS

Jeff Terrell
August 3, 2018

I'm starting a new job this month (August, 2018). I'm the new Professor of the Practice in the Computer Science Department of the University of North Carolina at Chapel Hill. Being a professor has been a dream of mine for years, and I'm super excited to get started! Here's a little bit about the job and my transition to it.

Most of the kinds of professors you see quoted in newspapers are research professors. These people might teach classes, but typically their passion is their research. Some have labs full of "research assistant" grad students and even post-doctoral researchers ("postdocs") and might co-author dozens of academic papers a year. On the other end of the spectrum, some research professors might not employ any students or work with anybody else. Most fall somewhere in between and are either tenure-track or tenured.

I decided when I was first looking for a professorship that this wasn't the kind of professor I wanted to be. The day-to-day work mostly consists of looking for and applying for grants to support the research, supervising the work done by their grad students and postdocs, and reading and writing papers. These kinds of activities don't generally excite me, and I generally don't want to be in a "publish or perish" situation, working long hours at the expense of my family to publish enough papers to achieve tenure.

Continue reading →

Looking for work

Jeff Terrell
May 1, 2018

I have an exciting new job lined up on July 1 (stay tuned for that announcement update: see announcement here), but I have about a month and a half free between now and then. Anybody have a project they could use my help on? I specialize in Clojure[script], data analytics and visualization, and Javascript, and I've been known to work on Rails and other projects as well. You can find my résumé here and my LinkedIn Profile here.

Here's a summary of my skills:

I am a versatile programmer with a deep bag of tricks and an eye towards beautiful, maintainable code. I learn quickly and communicate well; I am disciplined and responsible; and I will be the sort of freelance programmer you would hire again and again.

Continue reading →