Website profiles · Technology insights · Alternatives

shellscript.sh

This tutorial is written to help people understand shell script programming (aka shell scripting), and hopefully to introduce some of the possibilities of simple but powerful programming available under the Bourne shell. As such, it has been written as a basis for one-on-one or group tutorials and exercises, and as a reference for subsequent use.

Paid content
Visit website
Profile views 2 Outbound visits 9 Normal
The Shell Scripting Tutorial - The Shell Scripting Tutorial Full homepage screenshot

At a glance

Category
Development
Language
English
Paid-content signal
Paid contentObserved
Registered
Unknown
Hosting
CloudflareInferred
HTTPS certificate trusted
PassedObserved
Last updated

Website review

This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.

What is The Shell Scripting Tutorial?

The Shell Scripting Tutorial is a free, text-based course and reference for learning Bourne-compatible shell scripting on Unix and Linux. It teaches scripting by example alongside the underlying theory, covering the basics—first scripts, variables, wildcards, escape characters, loops, tests, case statements, external programs, and functions—plus hints, a quick reference, and exercises. It was written by Steve Parker, a senior DevOps engineer, and is designed both as a basis for one-on-one or group tutorials and as a reference to return to later.

Who it suits

  • Beginners with some Unix exposure. The tutorial states it assumes some prior experience, so it is not a first introduction to the command line.
  • Learners who want portability. It deliberately restricts itself to Bourne-compatible scripting, giving a baseline that works across many Unix and Linux environments rather than tying you to Bash-only features.
  • Tutors and study groups. The exercise-based structure supports guided sessions.

Trade-offs to weigh

The Bourne-first focus is the main trade-off: you get scripts that travel well, but Bash-specific conveniences are treated as extras in a separate examples section rather than the core path. If your daily work is Bash on Linux, expect to supplement the fundamentals with those examples.

Next step

Open the "A First Script" page and work through it in a terminal as you read, then attempt the exercises before moving on. Readers who prefer an offline copy can buy the tutorial as a PDF; the author also wrote Shell Scripting: Expert Recipes for Linux and Bash. For a Bash-oriented alternative once the basics are solid, the GNU Bash manual at GNU Project is the authoritative reference.

How do I write my first Bourne shell script step by step?

Start with a single script that prints text, then add one new shell feature at a time. The Shell Scripting Tutorial is built for exactly this: it teaches Bourne-compatible scripting by example alongside the theory, and it explicitly assumes some prior experience rather than starting from zero.

A practical first-script path

  1. Create the file. Open a terminal and make a file such as hello.sh in your working directory. Use .sh so the extension signals it is a shell script.
  2. Add the shebang line. The first line should be #!/bin/sh to run it with a Bourne-compatible shell. This matters because the tutorial deliberately stays within Bourne-compatible features so scripts work across Unix and Linux systems, even though Bash is the most common modern shell.
  3. Write one command. Put echo "Hello from my first script" on the next line. Keep it to a single statement so you can see cause and effect.
  4. Make it executable. Run chmod +x hello.sh so the system will treat it as a program.
  5. Run it. Execute ./hello.sh from the directory containing the file. If you see the greeting, the mechanics work.
  6. Add variables. Introduce a variable such as NAME="world" and use it in the echo line. The tutorial's sequence covers variables in several parts, which reflects how much nuance exists once you move past the basics.
  7. Introduce control flow. Add an if test, then a for or while loop, then a case statement. These are separate chapters in the tutorial, and working through them in order prevents the common mistake of copying loops before understanding tests.
  8. Factor out repetition with functions. Once a script has two or three repeated blocks, wrap them in a function. The tutorial treats functions as their own topic for good reason.
  9. Use the quick reference and exercises. The site includes a quick reference, an interactive shell section, and exercises. The exercises are the part most learners skip; doing them is what converts reading into recall.

Who this suits

The material is written as a basis for one-on-one or group tutorials and as a reference for later use, by an author with decades of Unix, Linux, and automation experience. That makes it a good fit for someone who already knows basic command-line navigation and wants a structured path, or for a team running a study group. A complete beginner with no terminal experience will need to learn basic commands first; the tutorial's stated assumption of prior experience means it will not walk through what cd or ls do.

A concrete scenario

Suppose you maintain a small Linux server and want a script that checks disk usage and emails you when a partition passes 90 percent. Start with the hello script above, then replace the echo with a df call, add an if test on the percentage, and wrap the whole thing in a function so you can call it for several mount points. Each step maps to one chapter of the tutorial, so you can build the script incrementally instead of writing it all at once.

Decision criterion

If you want a single linear course with exercises and a reference you can return to, work through this tutorial front to back. If you prefer video walkthroughs or a broader Linux administration curriculum, use this as your scripting reference and pair it with a general Linux course. For readers who want a book-length treatment, the same author's Shell Scripting: Expert Recipes extends beyond the tutorial's Bourne-only scope into Bash-specific features.

How do shell script variables, wildcards and escape characters work in practice?

Shell scripts handle variables, wildcards and escape characters in three distinct layers, and mixing them up causes most of the bugs beginners hit. Variables are plain name/value pairs you assign and expand; wildcards are expanded by the shell into matching filenames before your command runs; escape characters (and quoting) control when that expansion happens at all.

Variables

Assign without spaces around =, then expand with $name or ${name}. Braces matter when text follows the name, as in ${file}.bak, otherwise the shell reads $file.bak as a variable called file.bak. The tutorial treats variables across three separate chapters (Parts 1–3), which reflects how much behaviour sits behind a simple name=value line: quoting on assignment, defaults, and the difference between a variable you set and one you export to child processes. As a practical rule, quote expansions ("$var") unless you deliberately want word-splitting or wildcard expansion to happen on the value.

Wildcards

Patterns like *, ? and [abc] are matched against filenames by the shell itself, not by the program you call. So rm *.txt is really the shell building a list of matching files and passing them as arguments. Consequences worth knowing: a pattern that matches nothing is usually passed through literally (a classic source of "file not found" surprises), and filenames containing spaces break unquoted loops. The tutorial's Wildcards chapter sits early, before Loops, which is the right order — you need to understand expansion before writing for f in *.

Escape characters and quoting

Backslash escapes the next character's special meaning; single quotes protect everything inside; double quotes protect most things but still allow $ expansion. These are the tools for turning off the wildcard and word-splitting behaviour described above. The Escape Characters chapter follows Wildcards for exactly this reason: first learn what the shell does, then learn how to stop it.

How the pieces interact

Construct Expanded by shell? Typical use
$var unquoted Yes, plus word-splitting and wildcarding of the value Rarely what you want
"$var" Value only, no splitting or wildcarding Safe default
* unquoted Yes, to matching filenames Bulk file operations
"*" or \* No, literal asterisk Passing a pattern to grep, find, etc.
'$var' No Literal text containing $

A concrete scenario: a backup script that loops over files. for f in $DIR/* breaks if DIR contains spaces or is empty; for f in "$DIR"/* keeps the directory intact while still letting the shell list files. Then cp "$f" "$f.bak" needs braces — "${f}.bak" — to avoid the shell hunting for a variable named f.bak.

Next step

Work through the tutorial's chapters in page order — Variables (Part 1), Wildcards, Escape Characters, Loops — writing and running each example rather than reading it, since expansion behaviour is far easier to see than to remember. The site also publishes a PDF version of the tutorial for offline reference, and its author, Steve Parker, has written Shell Scripting: Expert Recipes for readers who want to go past Bourne-compatible basics into Bash-specific features. If you prefer a different teaching style, GNU documents Bash itself, and The Linux Documentation Project hosts longer-form guides; the tutorial here is best treated as a structured course with exercises, not a complete language reference.

How can I use loops, test conditions and case statements to automate a Linux task?

Use loops to repeat work over a list of items, test/[ ] conditions to decide whether each step should run, and case to branch on a small set of known values. Together they turn a manual sequence of commands into one script that checks its own preconditions and handles variants without you retyping commands.

A concrete pattern

Suppose you need to clean up log files for several services and behave differently per service. A Bourne-compatible script can combine all three constructs:

for svc in web api db; do
  dir="/var/log/$svc"
  if [ -d "$dir" ]; then
    case "$svc" in
      web|api) keep=7 ;;
      db)      keep=30 ;;
      *)       keep=14 ;;
    esac
    find "$dir" -name '*.log' -mtime +"$keep" -delete
  else
    echo "Skipping $svc: $dir not found" >&2
  fi
done

Here the loop supplies each service name, the if guards against a missing directory, and case encodes a per-service retention policy in one readable block. The same skeleton works for rotating files, restarting services, or syncing directories.

Choosing between if and case

Situation Better choice Why
Yes/no check (file exists, variable empty, exit code zero) if [ ... ] One condition, one branch
Two or three fixed alternatives if/elif Simple and explicit
Many fixed string values, or pattern matching (*.conf) case Flatter, easier to extend
Testing numeric ranges or comparing values if with -eq, -lt, etc. case matches patterns, not ranges

Practical advice

  • Quote variables ("$dir") inside tests so empty or space-containing values don't break the condition.
  • Use case when the set of valid inputs is closed — it doubles as lightweight input validation, with a *) branch to reject anything unexpected.
  • Prefer for over a list you control; use while read when looping over command output line by line.
  • Test destructive scripts on a copy or with echo in place of the real command first.

The tutorial at The Shell Scripting Tutorial is organized around exactly this progression — separate chapters on loops, test, and case — and is written as a basis for tutorials and exercises as well as later reference, which suits someone learning the constructs in order rather than looking up syntax piecemeal. Its stated scope is Bourne-compatible scripting, so the patterns above should carry across most Unix and Linux environments; Bash-specific extras are treated separately in its examples section.

Is this tutorial suitable for beginners, and what prior Unix experience do I need?

Yes, but with a caveat: it is written for people who already have some Unix familiarity. The tutorial's own audience section says it "assumes some prior experience," and its purpose is to teach shell script programming on top of that. So it suits a beginner to scripting more than a complete beginner to Unix.

Who gets the most from it

  • Newcomers to scripting with basic Unix exposure. If you can move around directories, edit a file and run commands in a terminal, you can follow the sequence from "A First Script" through variables, wildcards, loops, test and case without getting lost.
  • People learning in a structured way. The author says it was written as a basis for one-on-one or group tutorials and exercises, and as a reference afterwards, so it works for self-study or a study group.
  • Readers who want portability. The material deliberately stays within Bourne-compatible scripting, giving a baseline that works across many Unix and Linux environments; Bash-specific extras appear in a separate examples section.

Who should prepare first

Someone with no command-line experience at all will struggle, because the tutorial builds on shell commands rather than teaching them. A practical test: open a terminal, create a directory, move into it, create a text file and run a command against it. If any step needs looking up, spend a few hours on basic Unix commands first, then return.

A useful next step

Start with the "A First Script" page and type each example yourself rather than reading it. If the first script runs and you understand each line, continue in order; if not, the gap is Unix basics, not scripting. For hands-on practice, the site's exercises and "Tips and Examples" sections are the natural follow-up, and the quick reference is handy once you are writing your own scripts.

For a second perspective on the same fundamentals, LinuxCommand.org is a long-running, beginner-oriented companion.

How do I get the latest version or PDF of this tutorial, and does it cost anything?

The latest version is always at the official site, The Shell Scripting Tutorial; version and last-updated information appears at the top-right of the page. A PDF version is sold for $7, so the online tutorial is the free route and the PDF is the paid one.

What to expect

  • Online: free to read, organized as a sequence of lessons (first script, variables, wildcards, loops, functions, exercises) plus a quick reference.
  • PDF: the same tutorial in a portable, offline format, purchased rather than freely downloaded.

Choosing between them

Read a few chapters online first. If you'll work away from a browser, want to annotate, or prefer a single file for group exercises—the stated purpose includes one-on-one and group tutorials—the PDF is the practical option. If you just need a reference while at a terminal, the free site is enough.

A useful next step

Open the site, note the version number at the top right, and begin with "A First Script" before moving to variables and loops. Keep the quick reference page open in a second tab as you practice.

Related questions

More questions →
Which Shell Does The Shell Scripting Tutorial Teach?

The Shell Scripting Tutorial at shellscript.sh teaches Bourne-compatible shell scripting — the portable baseline shared across many Unix and Linux environments — rather than focusing on one specific modern shell. It explains the lineage from Steve Bourne's original sh through successors like csh, ksh, zsh, and Bash, and notes that Bash extends the Bourne shell while keeping the core scripting concepts compatible. A separate Shell Scripting Examples section shows Bash functionality that goes beyond the standard Bourne shell.

What "Bourne-compatible" means in practice

The tutorial deliberately restricts its core teaching to the Bourne shell dialect. That is a design choice with a clear payoff: scripts written against this baseline tend to work across many Unix and Linux systems, not just where one particular shell is installed.

  • Core lessons: Bourne-compatible syntax and concepts.
  • Bash extras: kept in a separate examples section, so you can tell which features are portable and which are Bash-specific.
  • Scope: fundamentals of shell scripting, written as a basis for one-on-one or group tutorials and exercises, and as a reference for later use.

If your goal is to write scripts that run in as many environments as possible, learning the Bourne-compatible baseline first is the safer path. If you know you will only ever run scripts under Bash, the examples section is where you pick up the additional functionality.

How the shell family fits together

The tutorial gives a short history to explain why it teaches what it does:

Shell Relationship to the original
sh (Bourne shell) The original, written by Steve Bourne; appeared in the Seventh Edition Bell Labs Research version of Unix
csh, ksh, zsh Variants and successors that appeared afterward
Bash ("Bourne Again" Shell) Widely used today; extends the Bourne shell with many additional features while maintaining compatibility with the core scripting concepts

The practical takeaway: Bourne-compatible knowledge transfers to Bash and the other successors, which is why the tutorial uses it as the teaching baseline.

Who this scope suits

The tutorial states that it assumes some prior experience. That makes it a better fit for readers who already know their way around a Unix or Linux command line and want to move from typing commands to writing scripts.

It suits you if:

  • You want a portable foundation before specializing in Bash-only features.
  • You are learning in a tutorial or group setting and need a shared baseline.
  • You want a reference you can return to for standard Bourne-compatible techniques.

It may not suit you if you need a from-zero introduction to the command line, or if you specifically want a Bash-only deep dive from the first lesson.

Practical next step

Start with the tutorial's early sections (a first script, variables, wildcards, escape characters, loops, tests, case statements) to build the Bourne-compatible baseline. Then use the Shell Scripting Examples section when you need Bash-specific functionality. The site notes that the latest version is always available at https://www.shellscript.sh, with version information at the top-right of the page — check that before relying on a saved copy.

How to Use Ahrefs for Your First SEO Audit: A Step-by-Step Tutorial

If you're new to Ahrefs and want to run your first SEO audit, the fastest path is: open Site Explorer, enter your target URL, review the Overview for a health snapshot, then dig into Organic Keywords, Top Pages, and Site Audit to find specific problems. From there, build a short prioritized to-do list instead of trying to fix everything at once.

This tutorial walks through that workflow using a realistic starting scenario, explains what the numbers mean, and shows how to turn findings into actions.

Before You Start: Pick a Narrow Scope

A common beginner mistake is auditing an entire large website on day one. The reports become overwhelming, and you can't tell which issues matter.

Instead, choose one of these starting points:

  • A single important page (your homepage or a key product/service page)
  • A small site (under ~50 pages, e.g., a personal blog or small business site)
  • One section of a bigger site (e.g., /blog/)

For this tutorial, assume you're auditing a small business site with about 30 pages. The same steps scale up later.

You'll need an Ahrefs account to follow along. Ahrefs offers paid plans, and pricing and feature limits change over time, so check the current Pricing page for what's included in each tier before committing.

Step 1: Enter Your Target in Site Explorer

Site Explorer is Ahrefs' core tool for analyzing any website or URL.

  1. Open Site Explorer from the top navigation.
  2. In the search box, paste your domain (e.g., example.com).
  3. Choose the Exact URL or Domain mode depending on scope. For a full-site view, use Domain or Prefix; for a single page, use Exact URL.
  4. Press Enter.

You'll land on the Overview report. Don't try to absorb everything — focus on four numbers first.

Reading the Overview Snapshot

Metric What it tells you How to use it
Ahrefs Rank (AR) Relative strength of the site's backlink profile vs. others in the database Useful for comparing against competitors, not as a standalone goal
Organic traffic Estimated monthly visits from search A rough trend indicator, not exact analytics
Organic keywords Estimated number of keywords the site ranks for Shows breadth of visibility
Backlinks / Referring domains Total links and unique sites linking to you Referring domains matter more than raw backlink count

Important caveat: Ahrefs' traffic and keyword numbers are estimates based on its own data. They won't match Google Search Console or your analytics exactly. Treat them as directional, not absolute.

Step 2: See What You Already Rank For

Go to Organic Keywords in the left sidebar. This shows queries where your site appears in search results.

Sort by Traffic (descending) to see which pages bring the most estimated visitors. Then look for:

  • Keywords ranking in positions 4–15 — these are often the easiest wins. A small content or on-page improvement can push them onto page one.
  • Keywords with high volume but low position — potential opportunities if the topic is relevant.
  • Irrelevant keywords — if you rank for something off-topic, it may signal thin or mismatched content.

Write down 5–10 of the position 4–15 keywords. These become your first optimization targets.

Step 3: Find Your Best and Weakest Pages

Open Top Pages. This ranks your URLs by estimated organic traffic.

Look for two things:

  1. Your top performers — understand what topics and formats work. Can you create more content like this?
  2. Pages with traffic but poor rankings — these may need on-page fixes (title, headings, internal links).

If a page gets zero traffic and targets a topic you care about, it's a candidate for a rewrite or consolidation.

Step 4: Run a Technical Site Audit

Now move to Site Audit. This crawls your site and flags technical and on-page issues.

  1. Click Site Audit → New project.
  2. Enter your domain and set crawl settings (default is usually fine for a small site).
  3. Start the crawl and wait for it to finish.

Once complete, you'll see a Health Score and a list of issues grouped by category.

Which Issues to Fix First

Not all issues are equal. Prioritize in this order:

Priority Issue type Why it matters
1 Broken links (404s) Bad for users and crawl efficiency
2 Pages blocked from indexing They can't rank at all
3 Missing or duplicate title tags Directly affects click-through and relevance
4 Slow-loading pages Affects experience and rankings
5 Thin content Low value to users and search engines

Ignore low-impact warnings (like minor meta description length) until the big items are handled.

Step 5: Turn Findings Into a To-Do List

You now have raw data. Convert it into a short, actionable list. Example:

  1. Fix 3 broken links found in Site Audit.
  2. Rewrite title tags on 5 pages with duplicate titles.
  3. Improve 4 pages ranking in positions 6–12 by adding missing subtopics and internal links.
  4. Remove or update 2 thin pages with no traffic.

Keep the list to 5–10 items max for your first audit. Finishing a short list beats starting a long one.

Common Beginner Mistakes

  • Chasing every red flag. Site Audit flags many minor issues. Fix what affects rankings and users first.
  • Trusting estimates as exact numbers. Ahrefs data is modeled, not measured from your analytics.
  • Auditing a huge site too early. Start small to learn the interface.
  • Ignoring search intent. A page can be technically perfect but still fail if it doesn't match what searchers want.
  • Forgetting to re-crawl. After fixes, run Site Audit again to confirm improvements.

Where to Go Next

Once your first audit is done:

  • Compare with competitors using Site Explorer's Competing Domains and Content Gap reports.
  • Track keyword rankings over time with Rank Tracker.
  • Explore backlink opportunities in the Backlinks and Link Intersect reports.
  • Set up recurring Site Audit crawls so new issues surface automatically.

Your first audit isn't about perfection — it's about building a repeatable habit: enter a target, read the key reports, pick the highest-impact fixes, and act. Do that once a month and your site's health compounds.

What Topics Does The Shell Scripting Tutorial Cover?

The Shell Scripting Tutorial at shellscript.sh is a Bourne shell programming tutorial that walks through shell scripting by example, alongside the theory. Its topics run from writing a first script through variables, wildcards, escape characters, loops, tests, case statements, and functions, then on to external programs, hints and tips, a quick reference, an interactive shell section, exercises, and a tips and examples section. It is written as a basis for one-on-one or group tutorials and exercises, and as a reference for later use.

Core Scripting Topics

The tutorial's navigation lays out the main sequence of subjects:

  • A First Script
  • Variables (covered in three parts)
  • Wildcards
  • Escape Characters
  • Loops
  • Test
  • Case
  • External Programs
  • Functions

This ordering moves from a minimal working script to the building blocks most Bourne-compatible scripts rely on: storing values, matching filenames, handling special characters, repeating work, testing conditions, branching, calling outside programs, and organizing code into functions.

Reference, Practice, and Examples

Beyond the core lessons, the tutorial includes sections meant for lookup and practice:

  • Hints and Tips — practical guidance alongside the lessons.
  • Quick Reference — a condensed lookup for scripting syntax and constructs.
  • Interactive Shell — material on working with the shell interactively.
  • Exercises — practice problems tied to the tutorial content.
  • Tips and Examples — additional worked examples; the site notes this section shows how Bash provides useful functionality beyond the standard Bourne shell.

There is also a Philosophy page and a Home page in the navigation, which frame the tutorial's approach rather than teach syntax.

Which Shell It Teaches

The tutorial restricts itself to Bourne-compatible shell scripting, providing a baseline that works across many Unix and Linux environments. The site traces this lineage from Steve Bourne's original shell, which appeared in the Seventh Edition Bell Labs Research version of Unix, through successors such as csh, ksh, and zsh, to Bash — the "Bourne Again" Shell — which extends the original while keeping compatibility with the core concepts Bourne established. Bash is described as one of the most widely used shells today.

If you are learning specifically to write scripts that run under Bash, the core lessons still apply, and the examples section is where Bash-specific extras appear. If you need portability across many Unix and Linux systems, the Bourne-compatible focus is the relevant part.

Who It Is For

The tutorial assumes some prior experience — the audience section begins by stating that assumption before describing its readers. It is written for people who want to understand shell script programming and to see the possibilities of simple but powerful programming under the Bourne shell. Because it is structured as a basis for tutorials and exercises as well as a reference, it suits both guided learners and people who want to look things up later.

Format and Conventions

The tutorial explains its own typographical conventions in a dedicated section, so readers know how code, commands, and placeholders are presented before working through the lessons. It is authored by Steve Parker, a Senior DevOps Engineer with 30+ years of Unix, Linux, and automation experience and author of Shell Scripting: Expert Recipes for Linux, Bash and more. The tutorial was first published on 4 July 2000; the site lists v4.6 as the current version, last updated and reviewed 29 June 2026.

Getting the Latest Version and the PDF

The latest version is always available at https://www.shellscript.sh, and the site advises checking the version information at the top-right of the page to confirm you are reading the most up-to-date version from the authoritative source. The tutorial can also be bought as a PDF for $7; the site's payment platform listing includes Gumroad. The free web version and the paid PDF are separate options — the site presents the PDF as a purchase, not as a free download.

How to Use It

A practical path through the material:

  1. Read Purpose Of This Tutorial and Audience to confirm the Bourne-compatible scope fits your environment.
  2. Work through A First Script, then the three Variables parts, Wildcards, and Escape Characters in order.
  3. Continue with Loops, Test, and Case, doing the Exercises as you go to check understanding.
  4. Move to External Programs and Functions once the basics are comfortable.
  5. Keep Quick Reference and Hints and Tips open for lookup, and use Tips and Examples when you want to see Bash features beyond the standard Bourne shell.

If you only need a single fact — how a loop is written, what a test does — the Quick Reference is the fastest entry point. If you are starting from scratch, begin at A First Script and follow the navigation order.

Who Is The Shell Scripting Tutorial Intended For?

The Shell Scripting Tutorial at shellscript.sh is written for readers who already have some prior experience and want to learn Bourne shell scripting by example, with theory alongside. It is not positioned as a complete-beginner introduction: the site's Audience section explicitly assumes some prior experience. It is also designed to work as the basis for one-on-one or group tutorials and exercises, and as a reference you can return to later.

Who gets the most from it

The tutorial fits you if you can already find your way around a Unix or Linux command line and want to move from typing commands to writing scripts. The stated purpose is to help people understand shell script programming and introduce the possibilities of simple but powerful programming available under the Bourne shell.

It is a weaker fit if you have never used a shell. Because the material assumes prior experience, a reader starting from zero will likely need a separate introduction to basic commands and file navigation first.

What it covers, and in what scope

The tutorial deliberately restricts itself to Bourne-compatible shell scripting. That gives you a baseline that works across many Unix and Linux environments rather than tying you to one shell's extras. The site notes that Bash extends the original Bourne shell with many additional features while keeping compatibility with the core concepts, and that a separate Shell Scripting Examples section shows Bash functionality beyond the standard Bourne shell.

The topic sequence on the site runs from a first script through variables (in three parts), wildcards, escape characters, loops, test, case, external programs, functions, hints and tips, a quick reference, the interactive shell, exercises, and tips and examples.

Your situation Is it a fit?
Comfortable with basic Unix/Linux commands, new to scripting Yes — this is the core audience
Running a study group or one-on-one teaching Yes — written as a basis for tutorials and exercises
Need a lookup reference while writing scripts Yes — intended as a reference for subsequent use
Never used a shell before Not yet — prior experience is assumed
Want deep Bash-specific features Partly — core material is Bourne-compatible; see the examples section for Bash extras

Practical details before you start

  • Author and provenance: written by Steve Parker, a Senior DevOps Engineer with 30+ years of Unix, Linux and automation experience, and author of Shell Scripting: Expert Recipes for Linux, Bash and more.
  • Version and updates: first published 4 July 2000; the page lists v4.6 as the current version, last updated and reviewed 29 June 2026. The site states the latest version is always at https://www.shellscript.sh and that you can check version information at the top-right of the page.
  • Formats: the tutorial is readable on the site, and the page offers it as a PDF for $7. Payment is handled via Gumroad. No free-access claim is made for the PDF; the site itself is the version the author points to as authoritative.

How to decide

If you already know your way around a terminal and want a structured path from first script to functions and case statements, start at "A First Script" and work through in order, using the exercises to test yourself. If you are teaching, the same sequence works as a lesson plan. If you are completely new to the command line, build that foundation first, then come back — the tutorial will make far more sense once the basics are in place.

What Is The Shell Scripting Tutorial at shellscript.sh?

The Shell Scripting Tutorial at shellscript.sh is a free online tutorial for learning Bourne-compatible shell scripting on Unix and Linux. It teaches fundamentals by example alongside theory, includes exercises and a quick reference, and is written for people who already have some prior experience. The site also sells a PDF version of the tutorial for $7.

What the tutorial covers

The tutorial focuses on Bourne-compatible shell scripting, which gives you a baseline that works across many Unix and Linux environments. Its stated purpose is to help readers understand shell script programming and to introduce the possibilities of simple but powerful programming available under the Bourne shell. It is written as a basis for one-on-one or group tutorials and exercises, and as a reference for later use.

The navigation shows the scope of the material:

  • A First Script
  • Variables (in three parts)
  • Wildcards and Escape Characters
  • Loops, Test, and Case
  • External Programs and Functions
  • Hints and Tips, a Quick Reference, and an Interactive Shell
  • Exercises, plus a Tips and Examples section

The Shell Scripting Examples section goes beyond the standard Bourne shell to show additional functionality that Bash provides.

Who it is for

The tutorial assumes some prior experience. It is not a first introduction to the command line; it is aimed at readers who want to learn scripting on top of existing Unix or Linux familiarity. The author describes it as suitable for individual or group study and as a reference you can return to.

Who wrote it and how current it is

The tutorial is written by Steve Parker, MSc, described on the site as a Senior DevOps Engineer with 30+ years of Unix, Linux, and automation experience, and author of Shell Scripting: Expert Recipes for Linux, Bash and more. The site states it was first published on 4 July 2000, with the current version listed as v4.6 and a last-updated date of 29 June 2026.

The site notes that the latest version is always available at https://www.shellscript.sh, and that you can check the version information at the top-right of the page to confirm you are reading the authoritative, up-to-date copy.

Free online vs. paid PDF

Online tutorial PDF version
Cost Free to read on the site $7
Access Web pages at shellscript.sh Downloadable document
Updates Site states the latest version is always online Fixed to the version you buy

The site lists Gumroad as a payment platform for the PDF. The online version is the one the site identifies as always current, so if you want the most recent content, read it on the site; buy the PDF if you want an offline copy to keep.

How to decide whether to use it

Use shellscript.sh if you already know your way around a Unix or Linux command line and want a structured, example-driven path through Bourne-compatible scripting, with exercises and a reference you can revisit. It suits self-study or running a small tutorial group.

Look elsewhere first if you need a complete beginner's introduction to the shell itself, or if you specifically want deep Bash-only features from the start — the core tutorial deliberately stays within Bourne-compatible scripting, with Bash extras confined to the examples section.

Website Overview

The available information shows a mix of normal operation and configuration gaps. Depending on how the website is used, these gaps may affect secure access or the consistency of its public presentation.

Domain and Registration

Unknown

DNS and Email

Nameservers are provided by Cloudflare, indicating managed DNS hosting. No CNAME was found; the observed records resolve directly to addresses. No MX record was found. A conventional explicit inbound-mail route is not configured. TXT records include verification markers for Google. Such markers may also remain after a service stops being used. The lowest observed DNS TTL is 300 seconds.

TLS and Certificates

The public key uses EC with 256 bits. The server supplied a complete certificate chain. No organization name is present in the certificate; the available fields are consistent with domain validation. The certificate was issued within the Google Trust Services cloud or CDN ecosystem. The certificate's total validity is about 90 days, consistent with a short renewal cycle.

HTTP and Browser Security

X-Powered-By exposes backend information: PHP/8.5.12. The checked browser-security headers were not detected, leaving fewer explicit browser-side safeguards. The cf-ray response header indicates a CDN or caching proxy in the delivery path. No obvious internal addresses or debug information were found in the headers. The Server header identifies cloudflare without an exact version.

Technology Stack Analysis

The public page identifies Bootstrap, Google Analytics, Cloudflare, PHP without precise versions, leaving fewer clues for version-specific scanning.

Search and Social Sharing

The meta description has 348 characters and may be shortened in search results. The title has 59 characters, within a common display range. The observed directives allow indexing and link following. No Generator meta tag is publicly exposed. A viewport declaration is present, providing a basis for mobile layout.

Hosting and Email

DNSCloudflare
HostingCloudflare
EmailUnknown
Approximate IP geolocation (inferred; a CDN or proxy may differ from the origin server) Location unknown Inferred 104.21.14.106

Registration details

RDAP / WHOIS

Unknown

DNS records

DNS

TypeNameValueTTLPriority
Awww.shellscript.sh104.21.14.106300—
Awww.shellscript.sh172.67.158.165300—
AAAAwww.shellscript.sh2606:4700:3033::6815:e6a300—
AAAAwww.shellscript.sh2606:4700:3033::ac43:9ea5300—
NSshellscript.shcasey.ns.cloudflare.com86400—
NSshellscript.shhadlee.ns.cloudflare.com86400—
TXTshellscript.shgoogle-site-verification=Pnyikr7QmUX6yhQrZ-zmffhCGMowAiV6ePzwO6tU6P4300—
TXTshellscript.shv=spf1 ip4:66.175.210.189/32 include:steve-parker.org -all300—
DMARC_dmarc.shellscript.shv=DMARC1;p=reject;pct=100;aspf=r;adkim=s;rua=mailto:[email protected]300—

TLS and certificates

TLS / SSL

AssessmentNormal configuration
Supported protocolsTLSv1.2、TLSv1.3
Negotiated protocolTLSv1.3
Certificate subjectshellscript.sh
IssuerGoogle Trust Services
Valid until2026-11-24T21:19 · Remaining when checked: 32 days
Verification detailsCertificate trust: Passed · Hostname match: Passed

HTTP response headers

HTTP

HeaderValue
content-typetext/html; charset=UTF-8
cache-controlmax-age=14400
servercloudflare

Identified technologies

BootstrapGoogle AnalyticsCloudflarePHP

Pages, Search and Sharing

Meta descriptionThis tutorial is written to help people understand shell script programming (aka shell scripting), and hopefully to introduce some of the possibilities of simple but powerful programming available under the Bourne shell. As such, it has been written as a basis for one-on-one or group tutorials and exercises, and as a reference for subsequent use.
Canonical URLhttps://www.shellscript.sh/
LanguageEnglish (default)
Twitter CardNot detected
All bots 1 allowed · 0 disallowed
  • Allow/
amazonbot 0 allowed · 1 disallowed
  • Disallow/
applebot-extended 0 allowed · 1 disallowed
  • Disallow/
bytespider 0 allowed · 1 disallowed
  • Disallow/
ccbot 0 allowed · 1 disallowed
  • Disallow/
claudebot 0 allowed · 1 disallowed
  • Disallow/
diffbot 0 allowed · 1 disallowed
  • Disallow/
google-extended 0 allowed · 1 disallowed
  • Disallow/
gptbot 0 allowed · 1 disallowed
  • Disallow/
omgili 0 allowed · 1 disallowed
  • Disallow/
anthropic-ai 0 allowed · 1 disallowed
  • Disallow/
claude-web 0 allowed · 1 disallowed
  • Disallow/
cohere-ai 0 allowed · 1 disallowed
  • Disallow/
mistralai-training 0 allowed · 1 disallowed
  • Disallow/
meta-externalagent 0 allowed · 1 disallowed
  • Disallow/
googleother 0 allowed · 1 disallowed
  • Disallow/
baiduspider 0 allowed · 1 disallowed
  • Disallow/
petalbot 0 allowed · 1 disallowed
  • Disallow/
awariosmartbot 0 allowed · 1 disallowed
  • Disallow/
awariorssbot 0 allowed · 1 disallowed
  • Disallow/
google-cloudvertexbot 0 allowed · 1 disallowed
  • Disallow/
qualifiedbot 0 allowed · 1 disallowed
  • Disallow/
cotoyogi 0 allowed · 1 disallowed
  • Disallow/
icc-crawler 0 allowed · 1 disallowed
  • Disallow/
atlassian-bot 0 allowed · 1 disallowed
  • Disallow/
fishbot 0 allowed · 1 disallowed
  • Disallow/
borderxbot 0 allowed · 1 disallowed
  • Disallow/
navubot 0 allowed · 1 disallowed
  • Disallow/
semrushbot-swa 0 allowed · 1 disallowed
  • Disallow/
wardbot 0 allowed · 1 disallowed
  • Disallow/
magpie-crawler 0 allowed · 1 disallowed
  • Disallow/
kimibot 0 allowed · 1 disallowed
  • Disallow/
citibotsitecrawler 0 allowed · 1 disallowed
  • Disallow/
chatgpt-user 0 allowed · 1 disallowed
  • Disallow/
meta-webindexer 0 allowed · 1 disallowed
  • Disallow/
meta-externalfetcher 0 allowed · 1 disallowed
  • Disallow/
claude-user 0 allowed · 1 disallowed
  • Disallow/
claude-searchbot 0 allowed · 1 disallowed
  • Disallow/

Recent Updates

  • Website images
  • Screenshots
  • Network details
  • Website Technologies
  • Pages and Search Information
  • TLS and certificates
  • DNS Information

User reviews (0)

  • No reviews yet.