Shell Script Basics

Many people new to Linux systems are stumped by shell scripting.

The big picture: fundamentally shell scripting is a collection of many individual commands.

Learn the basics of common commands and scripting becomes easier. Possibly the most common commands used in shell scripts are grep, sed, cut, and awk.

Fundamentally shell scripts are based on if-then and for-done loops. Inside those loops are individual commands.

Combine those basics with variables to temporarily store information.

A repeated collection of commands usually are stored as functions. Functions allow writing code only once but can be used many times.

Often added in scripts are error checking and robustness (fool proofing), but that is not essential to the basics of scripting.

Posted: Category: Tutorial Tagged: General

Next: Machine ID

Previous: Ransomware Victims Should Suffer