From 701f10fbea20a009a4c823711f64360e24361d05 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 12 Jan 1999 19:28:41 +0000 Subject: [PATCH] Simplify command that extracts the number of pages from a PostScript file; use "grep -c" instead of "grep | wc -l | cut ... | tr ...". --- Doc/tools/getpagecounts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tools/getpagecounts b/Doc/tools/getpagecounts index 46d3a138083..7ede6b89595 100755 --- a/Doc/tools/getpagecounts +++ b/Doc/tools/getpagecounts @@ -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