I often type out long commands that I don't want to repeat. If I get a juicy command that works--I generally use echo to send it to a file. Is there an alias or script that I could write in bash that could streamline this process?
Maybe a script that takes the filename as a parameter and essentially
echo !! >> filename
So that I could just do:
$ sweet_command -killer options
$ scriptname filename
And the command would shoot over to the file?
Start Free Trial