Answer by Michael Vehrs for Run previous command with multiple replacements
You can do it like this: !!:s/jpg/png/:s/photo/picture/
View ArticleAnswer 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 ArticleRun 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
More Pages to Explore .....