I read ^[0-9]* *VM\? as
match 0 or more occurances of a digit at the beginning of a line
match zero or more occurances of a space
match a V
optionally match one M (shell interpretive issues with backslash and ?)
3V)_ and 9VL@ both meet that criteria.

rather
^[0-9]+ +VM\\[?]
if you're looking for
0 VM\?

I find it helpful to eliminate shell issues by making special characters in a class
A regular expression may be followed by one of several repetition oper-
ators:
? The preceding item is optional and matched at most once.
* The preceding item will be matched zero or more times.
+ The preceding item will be matched one or more times.


Simon Hobson wrote:

print command = grep -v '^[0-9]* *VM\?' <%s >%s-2 ; rm %s ; lpr -P%p -o raw %s-2

in our smb.conf file. This is to do away with the test MS do in the postscript file to see how much memory the printer has and not print the job if MS decide the printer can't do it (I've yet to see a job actually fail).

What this should do (or more correctly, what I intended it to do) is delete any lines that start with some digits, some spaces, and the literal "VM\?". Once we realised what the problem was and checked again, I found that this also matched lines like :

3V)_5qZ$%5r88#qrUKaWQ9d>)o\)#Gn,;eDpH2$<qp4]kqY>7h>5e3apA4FPq"XOYo_J(XoDeC]


and

[EMAIL PROTECTED])SFQp&+FcoCr(NhoYo4!l;X`q8**G!l2XhrPSKMqS<3J_tq=I`pq"I


These lines are part of the image data for bitmapped images on the page.

Altering the match to '^[0-9][0-9]* VM\?' seems to have fixed the problem. However I'm curious as to why the two lines above were matched when they don't even include the letters 'VM' ?

Simon




And for the benefit of anyone searching the archives ...

The message this is designed to get rid of is :

This job requires more memory than is available in this printer.
Try one or more of the following, and then print again:
For the output format, choose Optimize For Portability.
In the Device Settings page, make sure the Available PostScript Memory is accurate.
Reduce the number of fonts in the document.
Print the document in parts.


--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

Reply via email to