This Will Make You a Command-Line Ninja

Lift your skills with these tips, tricks, and a bit of effort

Erik van Baaren
Python Land

--

Photo by Aisha Askhadova on Unsplash

A well-crafted bash command or script can save hours of manual labor. This tutorial will show you exactly how easy it is to become a command-line ninja and automate those tedious tasks. If you need to polish your basics, head over to Shell Commands Every Developer Must Know.

1. The Unix philosophy

The command line has been around for decades and it’s still going strong. Part of that success comes from the Unix philosophy:

  • Write programs that do one thing and do it well.
  • Write programs to work together.
  • Write programs to handle text streams, because that is a universal interface.

When working with the command line, it’s good to keep this philosophy in mind. You’ll find that there’s always a combination of tools that does exactly what you want. The art is finding them and combining them properly.

For this article, I do assume you have basic knowledge of the command line. You should know what a terminal is and how to start one. You must be able to edit files and be familiar with basic commands, like cd, ls, cat, and less.

2. Creating shell scripts

--

--