hpr1903 :: Some further Bash tips
Some more information about types of expansion in Bash
Hosted by Dave Morriss on Wednesday, 2015-11-18 is flagged as Explicit and is released under a CC-BY-SA license.
Bash, expansion, tilde expansion, command substitution.
2.
The show is available on the Internet Archive at: https://archive.org/details/hpr1903
Listen in ogg,
spx,
or mp3 format. Play now:
Duration: 00:29:18
Bash Scripting.
This is an open series in which Hacker Public Radio Listeners can share their Bash scripting knowledge and experience with the community. General programming topics and Bash commands are explored along with some tutorials for the complete novice.
Some further Bash tips
Expansion
There are seven types of expansion applied to the command line in the following order:
- Brace expansion (we looked at this subject in the last episode 1884)
- Tilde expansion
- Parameter and variable expansion (this was covered in episode 1648)
- Command substitution
- Arithmetic expansion
- Word splitting
- Pathname expansion
We will look at some more of these in this episode but since there is a lot to cover, we'll continue in a later episode.
I have written out a moderately long set of notes about this subject and these are available by following this link.
Links
- Bash Reference Manual:
- Tilde Expansion: https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html
- Command Substitution: https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html
- HPR episode 1648 "Bash parameter manipulation"
- HPR episode 1843 "Some Bash tips"
- HPR episode 1884 "Some more Bash tips"