Linux shell scripting
A practical introduction to writing shell scripts under Linux using the Bourne shell, with concepts also applicable to Korn shell users. Delegates learn to read and write scripts, work with variables and control structures, and build simple utilities for administration and development.
Course overview
A practical introduction to writing scripts using the Bourne shell under any Linux operating system. Applicable for those using the Korn shell as well.
What you will learn
- Read shell scripts.
- Write shell scripts.
- Use different types of quotes.
- Recognise the role of shell scripts within the Linux system.
Who will benefit
- Programmers developing programs under UNIX.
- Administrators / support personnel who wish to find out more about the workings of Linux or write simple utility programs.
Prerequisites
Course content
Review of Linux fundamentals
Basic shell scripts
What does the shell do? How are commands executed? Different shells. what is a shell script? Comments, creating shell scripts.
Variables
Setting variables, using variables, set, scope, export, sourcing, environmental variables, read.
Positional parameters
$0 to $9, $#, $* and others. shift parameter substitution.
Control statements
The test command The if statement while loops for loops The case statement.
Special characters
Redirection of errors, here documents, quoting.
Arithmetic in shell scripts
The expr command.
System shell scripts
Screen handling
The terminfo database, The tput command.
Advanced issues (optional session)
Shell functions, getopts, xargs, debugging shell scripts, portability issues. Extras in the Korn shell.
Optimising shell scripts
The time command, performance tips.
Where this course fits
What engineers say
“"Course was tailored to our requirements. Very flexible."
“"I’ve found it very useful and the course was very well put together and delivered."
Dates & prices
View full schedule →Private & bespoke delivery for your team
We run this course exclusively for your organisation — at your site, our venue, or online. Flexible dates, tailored content, and pricing based on group size.
Not sure if this course is right?
Talk to one of our engineers about your environment, experience level, and goals. We’ll confirm whether this course is the right fit or suggest a better alternative.