Here are some automation examples that are simple things we do a lot. Windows system administrators take heed—these examples are fairly Unix/Linux-centric, but the general principles apply to all operating systems.
Most command-line systems have some kind of alias facility. This enables you to create new commands out of old ones. The syntax is different for every kind of command line. Unix has many different shell (command-line) languages, the most popular being bash and csh. They are different in many ways, but what you'll notice here (mostly) is that bash requires an equals sign. I'll give examples for both shells.
The bash examples will work for any shell modeled after the original Bourne Shell by Steve Bourne (/bin/sh), such as the Korn Shell (/bin/ksh), and the Z Shell (/bin/zsh). Likewise, the csh examples will work for any shell with csh roots, including the Tenex C shell (/bin/tcsh).
For example, I often need to change directory (
cd) to a specific directory that has a
very long path. This is a good example of where an alias is
alias book='cd ~tal/projects/books/time/chapters'
alias book 'cd ~tal/projects/books/time/chapters'
Now I can type
whenever I want to be in the right directory for working on my
current book. If I start working on a new book, I update the alias.
(I've been typing "book" for the last six or so years!)
This not only saves typing, it records the location so that ...