Ubuntu Server Tip: command replacement
Bug #413131 reported by
Taladan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Server Tips |
Fix Committed
|
Undecided
|
Dave Walker |
Bug Description
If you find yourself needing to perform a command a second time on a different file, you can use command replacement with the ^ symbol.
Example:
cp foo.txt /to/some/directory
^foo^bar
(results in the cli executing: cp bar.txt /to/some/directory)
This is particularly useful when you want to perform the same action on some things, but not all things in your current directory.
Changed in ubuntu-server-tips: | |
status: | Confirmed → Fix Committed |
assignee: | nobody → Dave Walker (davewalker) |
To post a comment you must log in.
Thanks for the suggestion. Will try and made this suggestion more concise.