http://www.perlmonks.org?node_id=232708


in reply to The problem with one-liners...

$ perl -e'print "Just Another Perl One-Liner\n"' Just Another Perl One-Liner $ history -n -1 | head -1 >> ~/oneliners.txt
Or something like that ;^) ...I even
alias keep='history -n -1 | head -1 >> ~/oneliners.txt'
In my .kshrc...that makes it pretty slick