© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
J. VarmaPro Bash https://doi.org/10.1007/978-1-4842-9588-5_2

2. Input, Output, and Throughput

Jayant Varma1  
(1)
Berwick, VIC, Australia
 

Two of the commands we used in Chapter 1 are workhorses of the shell scripter’s stable: echo and printf. Both are bash built-in commands. Both print information to the standard output stream, but printf is much more powerful, and echo has its problems.

In this chapter, we will cover echo and the problems it brings, the capabilities of printf, the read command, and the standard input and output streams. We’ll start at first with an overview of parameters and variables.

Parameters and Variables

To quote the bash manual (type ...

Get Pro Bash: Learn to Script and Program the GNU/Linux Shell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.