Index

A

aliases

Section 5.1, “What are aliases?”

ANSI-C quoting

Section 3.5, “ANSI-C quoting”

arguments

Section 2.1.2, “Checking command line arguments”

arithmetic expansion

Section 4.7, “Process substitution”

arithmetic operators

Section 4.7, “Process substitution”

array

Section 2.1, “Creating arrays”

awk

Section 1, “Getting started with gawk”

awkprogram

Section 1.2, “Gawk commands”

B

bash

Section 2, “Advantages of the Bourne Again SHell”

.bash_login

Section 1.2.2, “~/.bash_login”

.bash_logout

Section 1.2.5, “~/.bash_logout”

.bash_profile

Section 1.2.1, “~/.bash_profile”

.bashrc

Section 1.2.4, “~/.bashrc”

batch editor

Section 1.1, “What is sed?”

break

Section 5.1, “The break built-in”

boolean operators

Section 2.4, “Boolean operations”

Bourne shell

Section 1.2, “Shell types”

brace expansion

Section 4.3, “Tilde expansion”

built-in commands

Section 3.2, “Shell built-in commands”

C

case statements

Section 2.5, “Using the exit statement and if”

character classes

Section 2.2.2, “Character classes”, Section 3.2, “Character classes”

child process

Section 3.1, “General”

combined expressions

Section 1.1.1, “Expressions used with if”

command substitution

Section 4.6, “Arithmetic expansion”

comments

Section 2.2, “Adding comments”

conditionals

Section 1, “Introduction to if”

configuration files

Section 1, “Shell initialization files”

constants

Section 1.3, “Constants”

continue

Section 5.2, “The continue built-in”

control signals

Section 1.1.3, “Sending signals using the shell”

creating variables

Section 2.2, “Creating variables”

csh

The C shell, Section 1.2, “Shell types”

D

debugging scripts

Section 3, “Debugging Bash scripts”

declare

Section 1.2, “Using the declare built-in”, Section 2.1, “Creating arrays”

double quotes

Section 3.4, “Double quotes”

E

echo

Section 5.5, “An example Bash script: mysystem.sh”, Section 1.2, “script1.sh”, Section 3.2, “Debugging on part(s) of the script”, Section 1.2, “Using the echo built-in command”

editors

Section 1.1, “Writing and naming”

else

Section 2.1, “if/then/else constructs”

emacs

Section 1.1, “Writing and naming”

env

Section 2.1.1, “Global variables”

esac

Section 2.5, “Using the exit statement and if”

escape characters

Section 3.2, “Escape characters”

escape sequences

Section 1.2, “Using the echo built-in command”

/etc/bashrc

Section 1.1.2, “/etc/bashrc”

/etc/passwd

Section 1.2, “Shell types”

/etc/profile

Section 1.1, “System-wide configuration files”

/etc/shells

Section 1.2, “Shell types”

exec

Section 3.1, “General”, Section 2.4.2, “Read and exec”

execute permissions

Section 1.3, “Executing the script”

execution

Section 1.3, “Executing the script”

exit

Section 2.5, “Using the exit statement and if”

exit status

Section 1.2.1, “Testing exit status”

expansion

Section 4.1.5, “Shell expansions”, Section 4, “Shell expansion”

export

Section 2.3, “Exporting variables”

extended regular expressions

Section 1.3, “Basic versus extended regular expressions”

F

file descriptors

Section 2.3, “Redirection and file descriptors”, Section 2.4.1, “Using /dev/fd”

file name expansion

Section 4.9, “File name expansion”

find and replace

Section 2.4, “Find and replace with sed”

for

Section 1, “The for loop”

fork

Section 3.1, “General”

functions

Section 1.1, “What are functions?”

G

gawk

Section 1.1, “What is gawk?”

gawk commands

Section 1.2, “Gawk commands”

gawk fields

Section 2.1, “Printing selected fields”

gawk formatting

Section 2.2, “Formatting fields”

gawk scripts

Section 2.5, “Gawk scripts”

gawk variables

Section 3, “Gawk variables”

gedit

Section 1.1, “Writing and naming”

global variables

Section 2.1.1, “Global variables”

globbing

Section 3.2, “Debugging on part(s) of the script”

grep

Section 2.1, “What is grep?”

H

here document

Section 2.4.4, “Here documents”

I

if

Section 1.1, “General”

init

Section 3.1, “General”, Section 5.6, “Example init script”

initialization files

Section 1, “Shell initialization files”

input field separator

Section 2.4.1, “Bourne shell reserved variables”, Section 2.5, “Special parameters”, Section 3, “Gawk variables”

interactive editing

Section 2, “Interactive editing”

interactive scripts

Section 1, “Displaying user messages”

interactive shell

Section 2.2.2.1, “Invoked as an interactive login shell, or with `--login'”, Section 2.2.2.2, “Invoked as an interactive non-login shell”, Section 2.2.3.3, “Interactive shell behavior”

invocation

Section 2.2.1, “Invocation”

J

K

kill

Section 1.2, “Usage of signals with kill”

killall

Section 1.2, “Usage of signals with kill”

ksh

Korn shell, Section 1.2, “Shell types”

L

length of a variable

Section 3.2, “Length of a variable”

line anchors

Section 2.2.1, “Line and word anchors”

locale

Section 3.6, “Locales”

locate

Section 1.1, “Writing and naming”

logic flow

Section 5.4, “A word on order and logic”

login shell

Section 2.2.2.1, “Invoked as an interactive login shell, or with `--login'”

M

menu

Section 6, “Making menus with the select built-in”

metacharacters

Section 1.2, “Regular expression metacharacters”

N

nested if statements

Section 2.3, “Nested if statements”

noglob

Section 3.2, “Debugging on part(s) of the script”

non-interactive editing

Section 3, “Non-interactive editing”

non-interactive shell

Section 2.2.2.3, “Invoked non-interactively”

non-login shell

Section 2.2.2.2, “Invoked as an interactive non-login shell”

numeric comparisons

Section 1.2.2, “Numeric comparisons”

O

options

Section 6.1, “Displaying options”

output field separator

Section 3.2.1, “The output field separator”

output record separator

Section 3.2.2, “The output record separator”

P

parameter expansion

Section 4.5, “Command substitution”

PATH

Section 1.2, “script1.sh”

pattern matching

Section 3, “Pattern matching using Bash features”

positionalparams

Section 2.5, “Special parameters”, Section 1.3, “Positional parameters in functions”

POSIX

Section 2.1, “Bash is the GNU shell”

POSIX mode

Section 2.2.2.5, “POSIX mode”

primary expressions

Section 1.1.1, “Expressions used with if”

printenv

Section 2.1.1, “Global variables”

printf

Section 5.5, “An example Bash script: mysystem.sh”, Section 3.6, “The printf program”

process substitution

Section 4.8, “Word splitting”

.profile

Section 1.2.3, “~/.profile”

prompt

Section 1.3, “Changing shell configuration files”

Q

quoting characters

Section 3, “Quoting characters”

R

redirection

Section 4.1.7, “Executing commands”, Section 6.2, “Changing options”, Section 2.3, “Redirection and file descriptors”, Section 4, “I/O redirection and loops”

rbash

Section 2.2.10, “The restricted shell”

read

Section 2.1, “Using the read built-in command”

readonly

Section 1.3, “Constants”

regular expression operators

Section 1.2, “Regular expression metacharacters”, Section 2, “Interactive editing”, Section 2.4, “Special patterns”

regular expressions

Section 1, “Regular expressions”

remote invocation

Section 2.2.2.6, “Invoked remotely”

removing aliases

Section 5.2, “Creating and removing aliases”

reserved variables

Section 2.4, “Reserved variables”

return

Section 1.3, “Positional parameters in functions”

S

sed

Section 1, “Introduction”

sed editing commands

Section 1.2, “sed commands”

sed options

Section 1.2, “sed commands”

sed script

Section 3.2, “Writing output files”

select

Section 6, “Making menus with the select built-in”

set

Section 2.1.2, “Local variables”, Section 6.1, “Displaying options”, Section 1.4, “Displaying functions”

shift

Section 7, “The shift built-in”

signals

Section 1.1, “Introduction”

single quotes

Section 3.3, “Single quotes”

source

Section 1.3, “Executing the script”

special parameters

Section 2.5, “Special parameters”

special variables

Section 2.5, “Special parameters”

standard error

Section 2.3.1, “General”

standard input

Section 2.3.1, “General”

standard output

Section 2.3.1, “General”

string comparisons

Section 1.2.3, “String comparisons”

stty

Section 1.1, “Introduction”

submenu

Section 6.2, “Submenus”

subshell

Section 2.1, “Which shell will run the script?”

substitution

Section 3.3.1, “Substitution”, Section 3.3.3, “Replacing parts of variable names”

substring

Section 3.3.2, “Removing substrings”

syntax

Section 4.1.1, “Shell syntax”

T

tcsh

Section 1.2, “Shell types”

terminology

Section 5.3, “Terminology”

then

Section 1.1.2, “Commands following the then statement”

tilde expansion

Section 4.4, “Shell parameter and variable expansion”

transformation of variables

Section 3.3, “Transformations of variables”

traps

Section 2.1, “General”

true

Section 2.2.2, “Nested while loops”

U

unalias

Section 5.1, “What are aliases?”, Section 5.2, “Creating and removing aliases”

unset

Section 2.2, “Creating variables”, Section 2.3, “Deleting array variables”, Section 1.4, “Displaying functions”

until

Section 3, “The until loop”

user input

Section 2.1, “Using the read built-in command”, Section 2.2, “Prompting for user input”

user messages

Section 1.1, “Interactive or not?”

V

variables

Section 2, “Variables”, Section 1, “Types of variables”

variable expansion

Section 4.5, “Command substitution”

verbose

Section 3.2, “Debugging on part(s) of the script”

vi(m)

Section 1.1, “Writing and naming”

W

wait

Section 2.2, “How Bash interprets traps”

whereis

Section 1.1, “Writing and naming”

which

Section 1.1, “Writing and naming”

while

Section 2, “The while loop”

wildcards

Section 2.2.3, “Wildcards”

word anchors

Section 2.2.1, “Line and word anchors”

word splitting

Section 4.9, “File name expansion”

X

xtrace

Section 3.1, “Debugging on the entire script”, Section 3.2, “Debugging on part(s) of the script”