From the course: Bash Patterns and Regular Expressions

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Shell expansion order

Shell expansion order - Bash Tutorial

From the course: Bash Patterns and Regular Expressions

Start my 1-month free trial

Shell expansion order

- [Instructor] I won't go too far in depth about the types of shell expansion as we haven't covered them yet. However, I think it's important to understand that there's an order. This is important because you can troubleshoot easier knowing which order expansion is done in when you get different results than you expected. We have seven types of shell expansions. Brace expansion which is expansion of expressions within curly brackets. Tilde expansion which is the expansion of the tilde character to a user's home directory. Shell parameter and variable expansion is how Bash expands variables. Command substitution uses the output of a command as text. Word splitting is how the results of expansion are split into separate entities or words. Arithmetic expansion is how arithmetic expands. Filename expansion is how globs are expanded into lists and lastly, quote removal is when quote characters are removed from words. Quotes are special characters that can influence when and how text is…

Contents