home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.text.tex
- Path: sparky!uunet!mcsun!sun4nl!ruuinf!piet
- From: piet@cs.ruu.nl (Piet van Oostrum)
- Subject: Re: how many pages in a dvi file
- Sender: network-news@cs.ruu.nl
- Message-ID: <1992Nov20.160634.24471@cs.ruu.nl>
- In-Reply-To: BNB@MATH.AMS.ORG (bbeeton)
- Date: Fri, 20 Nov 1992 16:06:34 GMT
- Reply-To: piet@cs.ruu.nl (Piet van Oostrum)
- References: <721931672.294909.BNB@MATH.AMS.ORG>
- Organization: Dept of Computer Science, Utrecht University, The Netherlands
- Lines: 33
-
- >>>>> BNB@MATH.AMS.ORG (bbeeton) (BB) writes:
-
- BB> we frequently receive dvi files that are to be printed on one of
- BB> our typesetters. it would be quite useful to be able to determine
- BB> quickly how many pages are in a particular dvi file.
-
- BB> it shouldn't be difficult to extract from dvitype the code to
- BB> perform this check. but (1) we don't want to reinvent any wheels,
- BB> and (2) we haven't really got the time. if anyone out there has
- BB> already created such a utility, we'd really appreciate learning
- BB> about it.
-
- Here is something from one of the shell scripts I have:
-
- ( dvips $DVIF > $TMP1 ) 2> $TMP2
-
- COUNT=`awk '
- {
- for ( i = 1 ; i <= NF ; i++ )
- {
- if ( $i ~ / *\[[0-9]+\] */ )
- {
- Count++ ;
- }
- }
- }
- END { printf "%d", Count }
- ' $TMP2`
- --
- Piet* van Oostrum, Dept of Computer Science, Utrecht University,
- Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
- Telephone: +31 30 531806 Uucp: uunet!mcsun!ruuinf!piet
- Telefax: +31 30 513791 Internet: piet@cs.ruu.nl (*`Pete')
-