for file in "$@"; do
/usr/local/bin/convert -strip -interlace Plane "$file" "$file"
done
$xpath->evaluate( "contains(@class, 'foo' ) and name()='div'", $element )или уже $xpath->evaluate( "string(self::span[contains(@class, 'foo' )])", $element )которое вернет в случае успеха текст элемента, или пустую строку при фэйле.