[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: get number of pages of a PostScript file



On Sat, Apr 28, 2001 at 01:17:46PM +0200, Waldemar Brodkorb wrote:
> Hello Alexander,
> 
> * Alexander Steinert wrote:
> 
> > What's the fastest way to do this on the command line?
> 
> I think there are more than thousand solutions ;-)
> grep ^%%Pages file.ps|awk '{ print $2 }'

any idea why this is 2x as fast as the equivalent
   awk '/^%%Pages/ { print $2 }' file.ps
?

-- 
John Lenton (john@grulic.org.ar) -- Random fortune:
Oh John, let's not park here.
Oh John, let's not park.
Oh John, let's not.
Oh John, let's.
Oh John.
Oh.

Attachment: pgpF3ULrAZnpK.pgp
Description: PGP signature


Reply to: