]> granicus.if.org Git - python/commitdiff
Simplify command that extracts the number of pages from a PostScript
authorFred Drake <fdrake@acm.org>
Tue, 12 Jan 1999 19:28:41 +0000 (19:28 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 12 Jan 1999 19:28:41 +0000 (19:28 +0000)
file; use "grep -c" instead of "grep | wc -l | cut ... | tr ...".

Doc/tools/getpagecounts

index 46d3a138083255c3ef20fe5d52a75c19ca383334..7ede6b8959526b43eedf95984e12f1a6da8a0fc8 100755 (executable)
@@ -18,6 +18,6 @@ EOF
 
 for PART in api ext lib mac ref tut ; do
     FILE=paper-$PAPER/$PART.ps
-    PAGECOUNT=`grep '^%%Page:' $FILE | wc -l | cut -f 1 | tr -d '      '`
+    PAGECOUNT=`grep -c '^%%Page:' $FILE`
     echo "     $PART.ps -- $PAGECOUNT pages"
 done