I'm trying to detect corrupt eps.
for a jpg, I make a
Code: Select all
identify -verbose $path 2>&1 | grep Corrupt | wc -l
Does anyone has a good way to detect corruption in eps ?
Code: Select all
identify -verbose $path 2>&1 | grep Corrupt | wc -l
Code: Select all
# grep -c "%%BeginBinary:[ 0-9]*^Mbeginimage" 152168.eps
1
# grep -c "~>^M%%EndBinary" 152168.eps
1
# grep -c "%%BeginBinary:[ 0-9]*^Mbeginimage" 152169.eps
1
# grep -c "~>^M%%EndBinary" 152169.eps
0
Code: Select all
cat input_file | tr '\015' '\012' | sed -n '/^%%BeginBinary:/,$p; /^%%EndBinary/q' > extracted_text