On Fri, May 20, 2011 at 2:06 PM, Kurt H Maier <karmaf...@gmail.com> wrote: > Any reason not to sort(1) them before you feed them to perl? And > don't get me wrong: perl is my favorite language, but wouldn't > something akin to > > history | sort -r | sed '1d; s/^[ \t]*[0-9]*[ \t]*//' > > work just as well?
Yes. When I don't spend a few seconds considering what needs to be done before I start writing, my first impulse is to use Perl. (Don't forget to escape your asterisks in sed.) --Andrew Hills