Bash: Reading Input

The read command is a builtin command that reads from the standard input. By default, it reads until a newline is received. The input is stored in one or more variables given as arguments: read var If more than one variable is given, the first word (the input up to the first space or tab)…

Bash: Printf

printf: formatting and printing data printf FORMAT ARG … The FORMAT string can contain ordinary characters, escape sequences, and format specifiers. Ordinary characters are printed unchanged to the standard output. Escape sequences are converted to the characters they represent. Format specifiers are replaced with arguments from the command line. Escape sequences are single letters preceded…