You're viewing a comment by Amos Shapira and its responses.

Amos Shapira Permalink
June 14, 2008, 13:38

Answer to Gabriel about replacing more than one occurrence: you can use the !:s (the "^" is actually mentioned in the manual as a simplified version of "!:s"):

$ echo a b b b c
a b b b c
$ !:gs/b/d/
echo a d d d c
a d d d c

It's all in "man bash", BTW.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "disk_42": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.