Searching the output of last

Larry Wall lwall at jpl-devvax.jpl.nasa.gov
Wed May 1 03:55:21 AEST 1991


In article <130922 at uunet.UU.NET> rbj at uunet.UU.NET (Root Boy Jim) writes:
: The first file contains login records for today only.
: The second is cumulative for the entire month.
: We upgraded the OS yesterday, so you can extrapolate
: that it would take about an hour alone to run last
: on a whole month's statistics.
: 
: >last|perl -pe '$_ x=/(..:..)...(.*)/&&"'$1'"ge$1&&"'$1'"lt$2'
: >
: >That's gonna be tough for Randal to beat...  :-)
: 
: I just ran it with args 12:34 and 23:45. Here's the timing:
: 137.510u 88.580s 4:58.87 75% 0+0k 212+7io 0pf+0w
: 
: Five minutes for one day. Two and 1/2 hours for the entire month.
: 
: OK, so we're not a typical site :-)

Oh, good grief.  I wasn't optimizing for speed, but brevity (obscurity?).
By all means, read the file directly if you want speed.  There's More
Than One Way To Do It.

Larry



More information about the Comp.unix.questions mailing list