Getting started with Bash scripting

Custom Script


A few scripting tricks will help you save time by automating common tasks.

Shell scripts are a lazy person’s best friend. That may sound strange, because writing a shell script presumably takes work, but it’s true. Writing a shell script to perform a repetitive task requires some time up front, but once the script is finished, using it frees up the time the task used to take. In this article, I will introduce you to writing shell scripts with Bash. I’ll describe Bash scripting in the context of several common tasks. Because this is an introductory discussion, some nuances are glossed over or ignored, but I will provide plenty of information for you to get started on your own scripts.

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Putting Context Menus in Nautilus to Practical Uses
  • SHC: Bash Script Compiler

    The Bash Shell Script Compiler converts shell scripts directly into binaries. Compiling your scripts provides protection against accidental changes, but you will have to contend with some quirks.

  • Batsh

    Batsh kills two birds with one stone: Programs written in this language can be compiled both as Linux Bash scripts and Windows batch files.

  • Practical Python in Linux

    We’ll introduce you to Python, an easy-to-learn scripting language, and also help you get started creating your own practical Python scripts.

  • Bash vs. Vista PowerShell

    Microsoft’s new PowerShell relies on .NET framework libraries and thus has access to a treasure trove of functions and objects. How does PowerShell measure up to traditional shells like Bash?

comments powered by Disqus

Direct Download

Read full article as PDF:

090-095_scripting_SE10.pdf (1.71 MB)