EMBED YOUR TERMINAL RECORDINGS ONLINE

Bash event designator

DATE: 2011-10-12
AUTHOR: the machine
AUTHOR WWW: http://www.slashdot.org
RELATED ARTICLE: http://www.catonmat.net/blog/top-ten-one-liners-from-comm...

Related recordings:

CAT COMMAND IN LINUX
tags: cat unix gnu linux view file textfile editing
LIST DIRECTORIES IN LINUX WITH LS
tags: ls directory show content linux disk beginner
SUTRAPHP-INTRODUCTION
tags: sutraphp sutra php console cli eventbased
MORE OVERVIEW IN MYSQL WITH SELECTS
tags: mysql, select, more overview, console
M4, THE HIDDEN GNU TREASURE
tags: m4, gnu, macroprocessor, template, search, replace, sed
THE UNIX TREE COMMAND
tags: unix console tree bash directory listing
DEVTODO: COMMANDLINE TODO MANAGEMEN
tags: todo xml tasks productivity management
VIM ALIGN
tags: vim align aligning text text editing text trick
VISUAL SELECTS IN VIM
tags: vim visual selects regex text editing fast
GENERATING PHP & SQL (MAPPING) CODE
tags: sutra generate sql generate database php cms mysql





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

 

Name   
Email (never shown)  
Comment