Morjen, Ich bekomme bei einem SuSE Script eine Fehler meldung die ich nicht ganz verstehe.
Ausschnitt:
PHP-Code:
#
# The main system printer.
#
lp=""
if test -x /usr/bin/lpoptions ; then
dev=PS
size=a4
dpi=300
color=mono
shopt -s extglob
while read -t 10 line ; do
case "$line" in
PageSize*)
set -- $line
while test -n "$1" ; do
case "$1" in
\**) size="${1:1}"; break
esac
shift
done
;;
Resolution*)
set -- $line
reg='+([0-9]|+([0-9])x([0-9]))*'
cur=0
while test -n "$1" ; do
case "$1" in
$reg) cur=${1%%+([[:alpha:]])}
esac
case "$1" in
*Color*) color=color
esac
shift
### Das hier ist die Relevante Zeile ###
test "${cur%x*}" -gt "${dpi%x*}" && dpi=$cur
echo "# $cur => ${cur%x*} # $dpi => ${dpi%x*} #"
done
;;
ColorCorrection*)
set -- $line
while test -n "$1" ; do
case "$1" in
\*RGB|\*CMYK) color=color; break
esac
shift
done
;;
esac
done < <(lpoptions -l 2> /dev/null)
shopt -u extglob
lp="lp|${dev}-$(echo ${size}-auto-${color}-${dpi}|tr '[:upper:]' '[:lower:]')"
elif test -r /etc/printcap -a -d /var/lib/apsfilter/ ; then
lp=$(grep -E '^lp\|' /etc/printcap)
elif test -r /etc/printcap -a -x /usr/lib/lpdfilter/bin/readpc ; then
lp=$(/usr/lib/lpdfilter/bin/readpc lp || true)
fi
test -n "$lp" || exit 0 # No (configured) filter system: nothing to do
Wenn ich SuSEconfig Ausführe bekomme ich nun diese Meldung.
Code:
Executing /sbin/conf.d/SuSEconfig.tetex...
# 0 => 0 # 300 => 300 #
# 0 => 0 # 300 => 300 #
# 300x300 => 300 # 300 => 300 #
# 300x300 => 300 # 300 => 300 #
/sbin/conf.d/SuSEconfig.tetex: line 136: test: 600x600: integer expression expected
# 600x600x1 => 600x600 # 300 => 300 #
/sbin/conf.d/SuSEconfig.tetex: line 136: test: 600x600: integer expression expected
# 600x600x2 => 600x600 # 300 => 300 #
Offensichtlich liegt es an diesem Syntax der mir aber unbekannt ist.
Weil ich statt einem x zwei bekomme.
Meine Frage ist wie dieser Syntax funktioniert?
mfg undefined
[EDIT]
Diese zeile wird uebergeben:
Resolution/Print Quality: 300x300dpi *600x600dpi 600x600x1dpi 600x600x2dpi
Lesezeichen