Quantcast
Channel: Run previous command with multiple replacements - Unix & Linux Stack Exchange
Browsing all 3 articles
Browse latest View live

Answer by Michael Vehrs for Run previous command with multiple replacements

You can do it like this: !!:s/jpg/png/:s/photo/picture/

View Article



Answer by Jeff Schaller for Run previous command with multiple replacements

It's not shorter than just retyping your sample command, but you come at it from the other direction and recall only the pieces that you want (here ls and | grep, then type in the replacements: $ ls...

View Article

Run previous command with multiple replacements

Many of you probably know that the commands ^foo^bar^ or !:gs/foo/bar are useful for running the previous command with replacing the pattern "foo" with the pattern "bar". But is there a way to replace...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images