Created
September 29, 2012 16:26
-
-
Save ryanhanwu/3804510 to your computer and use it in GitHub Desktop.
Bash Tip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #replace previous command str1 to str 2 | |
| ^str1^str2^ | |
| or | |
| !!:gs/str1/str2/ | |
| # execute the most recent command the contains the following string: | |
| !?ncm | |
| cp /usr/local/etc/apache/file1.txt /usr/local/etc/apache/file2.txt | |
| #you can grap and reuse that prefix. It's named !#:1:h like: | |
| cp /usr/local/etc/apache/file1.txt !#:1:h/file2.txt !#:1:h/file3.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment