Ubuntu Server Tip: command replacement

Bug #413131 reported by Taladan
6
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.

Revision history for this message
Dave Walker (davewalker) wrote :

Thanks for the suggestion. Will try and made this suggestion more concise.

Changed in ubuntu-server-tips:
status: New → Confirmed
Dave Walker (davewalker)
Changed in ubuntu-server-tips:
status: Confirmed → Fix Committed
assignee: nobody → Dave Walker (davewalker)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.