Hallo, Am Wed, 21 Apr 2004, Joachim Kieferle schrieb:
Schon für
if [ $Bildbreite < 1280 ]; then
*grummel* Da sieht man mal wieder, wozu es fuehrt, wenn man [ verwendet, das dann fuer einen Teil der if-Syntax gehalten wird. Das ist nicht der Fall! if BEFEHLSLISTE; then BEFEHLE; [else BEFEHLE;] fi '[' ist der Befehl 'test', der sowohl als binary (/usr/bin/test, /usr/bin/[ (!)) als auch bei den meisten shells als "builtin" existiert. ==== $ help [ [: [ arg... ] This is a synonym for the "test" builtin, but the last argument must be a literal `]', to match the opening `['. ==== Also, fuer die bash: help test Und da steht drin, wie es geht: ==== arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne, -lt, -le, -gt, or -ge. Arithmetic binary operators return true if ARG1 is equal, not-equal, less-than, less-than-or-equal, greater-than, or greater-than-or-equal than ARG2. ==== Du sucht also nach: if test $Bildbreite -lt 1280; then -dnh -- If you haven't got time to RTFM, you haven't got time to whine on this mailing list.