1#! @@AWK@@ -f 2BEGIN { 3 4ID = "cdclpscat 1.0" 5DATE = "95/03/19(numaguti)" 6 7EX = "concat dcl.ps file" 8 9USAGE = "% cdclpscat <file>..." 10 11#---------------------------------------------------------------------------- 12# NO OPTION 13 14 if (ARGV[1] == "-help" || ARGV[1] == "help") { 15 exithelp=1 16 print " " ID,DATE 17 print " --- " EX 18 print " usage : " USAGE 19 exit 20 } 21 exithelp=0 22 23 head=1; body=0; page=0 24} 25 26/^%%Page:/ { 27 body=1; head=0; page++; 28 print "%%Page:", page, page; next 29} 30/showpage/ { 31 body=0; print; next 32} 33 34{ 35 if (head==1 || body == 1) print 36} 37 38END { 39 if (exithelp == 0) { 40 print "%%Trailer" 41 print "%%Pages:", page 42 print "%%EOF" 43 } 44} 45