Skip to Content
Linux Command Line and Shell Scripting Techniques
book

Linux Command Line and Shell Scripting Techniques

by Vedran Dakic, Jasmin Redzepagic
March 2022
Beginner to intermediate
552 pages
11h 26m
English
Packt Publishing
Content preview from Linux Command Line and Shell Scripting Techniques

Chapter 11: Working with Variables

Variables are one of the most important things in programming. Being able to store and then use values in our code is as important as being able to make decisions in our scripts using if statements.

We will cover the following recipes in this chapter:

  • Using shell variables
  • Using variables in shell scripting
  • Quoting in the shell
  • Performing operations on variables
  • Variables via external commands

We are going to cover the most important things you need to know about variables, but as with almost everything else, this chapter will require you to practice.

Technical requirements

The machine you can use for these recipes is the same as in the previous chapters on scripting—basically, anything that can run bash ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Linux Shell Scripting - Second Edition

Mastering Linux Shell Scripting - Second Edition

Mokhtar Ebrahim, Andrew Mallett
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar

Publisher Resources

ISBN: 9781800205192