Let’s end this chapter by discussing the following features of the bash shell environment:
• Using command substitution
• Using shell functions
The bash shell allows you to use command substitution, which allows you to run a command and have its output pasted back on the command line as an argument for another command. Essentially, command substitution allows you to perform multiple tasks at once.
Command substitution works by first creating a child process that runs the first command. The stdout from this command is then piped back to the bash shell. The shell parses the output from the first command into words separated by white space. After the pipe from the first command ...