分类: LINUX
2008-10-18 16:09:28
How bash Expands a Command Line
1. Split the line into words
2. Expand aliases
3. Expand curly-brace statements ({})
4. Expand tilde statements (~)
5. Expand variables ($)
6. Command-substituation ($() and ``)
7. Split the line into words again
8. Expand file globs (*, ?, [abc], etc)
9. Prepare I/O redirections (<, >)