Thursday, August 27, 2009
In Bash, if you have typed a very long command (applicable to shorter commands too :-)), and then realize you don't want to execute it yet, don't delete it.
Then what ?
Simply append a # to the beginning of the line (command), and then hit enter.
So bash is not going to execute this command (as its commented), but will store it in history. So later you can go back, remove the # from the front, and execute it.
Lets see my history (output of history command)
Well, if you are wondering how I have added the "command execution timestamp" to the history command output, here is the tip
And if you want to know how I made my Primary bash prompt (PS1) a colorful one, here is another tip
© Jadu Saikia http://unstableme.blogspot.com