I know that
$ ^previous^replacement^
will substitute "previous" with "replacement" in the last command in bash shell. How to substitute a nth command in the history?
An example:
!n:s/previous/replacement/
See the HISTORY EXPANSION section of the man page for full details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With