Getting started with Bash scripting

Custom Script

Author(s):

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.

Read full article as PDF:

090-095_scripting_SE10.pdf (1.71 MB)

Related content

  • 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.

  • 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.

  • PHP for Sysadmins

    Most admins tend to use the shell, Perl,or Python if they need a system administration script. But there is no need for web programmers to learn another language just to script a routine task. PHP gives admins the power to program command-line tools and even complete web interfaces.

  • Workspace: Text Expander

    A couple of utilities and a dash of Bash scripting are all you need to roll out a simple yet flexible text expander.

  • Parallel Bash

    You don't need a heavy numeric mystery to benefit from the wonders of parallel processing. This article describes some simple techniques for parallelizing everyday bash scripts.

Comments

comments powered by Disqus

Direct Download

Read full article as PDF:

090-095_scripting_SE10.pdf (1.71 MB)

News