openskills.info
Bash logoCourse Preview

Bash

Bash is the default command-line shell on most Linux distributions and macOS. It interprets commands, manages processes, and provides a scripting language for automating system administration tasks, file manipulation, and pipeline orchestration.

itLinux

Bash

Bash is both a command interpreter and a programming language. You use it interactively to run programs. You also place commands in scripts to automate repeatable work.

The name means Bourne-Again Shell. Bash builds on the traditional Bourne shell and adds features for interactive work and programming. It is largely compatible with sh, but Bash also has its own syntax and behavior.

The mental model

A Bash command line is not passed to a program exactly as you type it. Bash processes the text first.

input
  -> tokens and syntax
  -> expansions
  -> redirections
  -> command execution
  -> exit status

This processing model explains many surprises. A variable can become several arguments. A wildcard can become many filenames. A redirection can change where output goes before a command starts.

Quoting controls this processing. Single quotes preserve literal characters. Double quotes still allow selected expansions, including parameter expansion and command substitution. As a default, quote parameter expansions unless you specifically want word splitting or filename expansion.

name='Quarterly report'
printf '%s\n' "$name"

Here, "$name" becomes one argument. Without the double quotes, the result can be split into separate words.

Continue the course

This section is part of the paid course.

See pricing to subscribe, or log in if you already have access.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources