How can I add a command to the Bash history without executing it?

Posted by Grumbel on Super User See other posts from Super User or by Grumbel
Published on 2010-04-28T17:52:21Z Indexed on 2010/04/28 17:57 UTC
Read the original article Hit count: 230

Filed under:

Every now and then it would be useful to add a command directly to the history in Bash without actually executing it. So far the closed thing I have found is adding a # in front of it and hitting return. Are there better ways?

© Super User or respective owner

Related posts about bash