Word Substitution
Word specifiers allow you to retrieve individual words from previous command lines. Colons may precede any word specifier. After an event number, colons are optional unless shown here.
|
Specifier |
Description |
|
|
Command name. |
|
|
Argument number n. |
|
|
First argument. |
|
|
Last argument. |
|
|
Argument matched by a |
|
: |
Arguments n through m. |
|
|
Words 0 through
m; same as |
|
|
Arguments n through next-to-last. |
|
|
Arguments n
through last; same as |
|
|
All arguments; same as |
|
|
Current command line up to this point; fairly useless. |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access