On Sat, Apr 28, 2001 at 07:15:37PM -0300, John R Lenton wrote:
> > grep ^%%Pages file.ps|awk '{ print $2 }'
> 
> any idea why this is 2x as fast as the equivalent
>    awk '/^%%Pages/ { print $2 }' file.ps

Because grep, being a compiled program, can do file I/O faster than
awk, which is interpreted.

Walt

Attachment: pgpk8EN7WU32Z.pgp
Description: PGP signature

Reply via email to