I learnt something handy in BASH recently - operate-and-get-next (Ctrl-o). If you type:Then up-arrow back to 'echo one'. Then press Ctrl-o instead of enter it will execute the command and display the following one in your history ('echo two' in this case).Very handy for replaying a series of commands.$ echo one one $ echo two two $ echo three three
Friday, September 17, 2010
Repeating a series of commands in bash
Wow, this was really cool... captured from a thread on reddit..
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment