EMBED THIS RECORDING:
<div><script id="playterm-MjAxMS0xMC9iYXNoZXZlbnRkZXNpZ25hdG9ydHR5cmVjLTEzMTg0NTA3NDV8ODB4MjQ=" type="text/javascript" src="https://playterm.org/js/?hash=MjAxMS0xMC9iYXNoZXZlbnRkZXNpZ25hdG9ydHR5cmVjLTEzMTg0NTA3NDV8ODB4MjQ=" class="size:80x24"></script></div>
I recorded this `bash event designator` shellsession because I just discovered this trick on the
mentioned article (see above).
Basically its a quick search/replace:
^searchkeyword^replacedkeyword
it will perform the search/replace on the LAST executed command.
Any ideas to do multiple searchreplaces at once? (Like: sed 's/foo/flop/g;s/faa/flap/g')
I tried this in the recording but failed as you can see :)
Menz T said
cool, this is also good to remember:
$ foo=bar
$ echo $foo
bar
$ echo "${foo//bar/flop}"
flop