Revision 987, 459 bytes
(checked in by jalet, 21 years ago)
|
Postscript documents page counter shell script added.
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
Rev | Line | |
---|
[987] | 1 | #!/bin/sh |
---|
| 2 | # |
---|
| 3 | # Adapted and modified from the printquota project |
---|
| 4 | # http://printquota.sourceforge.net |
---|
| 5 | # |
---|
| 6 | # printquota (c) 2002-2003 Ahmet Ozturk & Cagatay Koksoy |
---|
| 7 | # printquota is distributed under the GNU General Public License |
---|
| 8 | # |
---|
| 9 | # Usage : pagecount.sh file.ps |
---|
| 10 | # |
---|
| 11 | ( |
---|
| 12 | (cat $* | sed -n -e '/%!PS-Adobe-/,/\%\%EOF/p' | grep -E -v "/Duplex|PageSize") |
---|
| 13 | echo currentdevice /PageCount gsgetdeviceprop == flush |
---|
| 14 | ) | gs -q -sDEVICE=bit -sOutputFile=/dev/null -r5 - | tail -1 |
---|