in reply to awk has its place
in thread AWK and Perl on UNIX

I'd do that as:

ls -l|perl -pale '$_=$F[4]'

which saves a couple of characters. I know what you mean, but I forgot most of the awk and sed that I ever knew when I learnt Perl.

--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me

Replies are listed 'Best First'.
Re: Re: awk has its place
by grinder (Bishop) on Mar 30, 2001 at 19:51 UTC

    True enough, but using fewer characters isn't necessarily faster (to type). There's four switches needed, whereas that p-r-i-n-t just rolls off the finger r-l-r-r-l and that tick dollar underscore equals dollar F has you bouncing up and down on the shift key. It just ain't as smooth.

    Reflecting on this, the few vestiges of awk that remain are more in my fingers than in my head.


    --
    g r i n d e r