system wrote:
Das folgende BASH-Script ruft eine Oracle-Abfrage auf und liefert in $LINE entweder 0 oder einen Wert > 0. Wenn der Wert 0 ist soll das Script beendet werden.
1 ANZAHL=0 2 sqlplus -s $EMAILLOGIN v_status.sql | while read LINE 3 do 4 if (test $LINE ) then 5 ANZAHL=`expr $LINE` 6 fi 7 done 8 if ( test $ANZAHL -eq 0 ) then 9 exit 0 10 fi
In Zeile 5 wird ANZAHL auf den Wert in $LINE gesetzt (z.B. 5). Das Funktioniert. Beim Vergleich in Zeile 8 hat ANZAHL jedoch wieder den Initialwertwert von Zeile 1.
Welche Möglichkeiten habe ich, um ANZAHL global zu benutzen ? oder wie kann man das Problem anders lösen ?
Hi ?system?, versuch mal ....... declare -x ANZAHL ANZAHL=0 ........... Zu finden auch in (ich_trauŽs_mich_fast_nicht_zu_sagen) : man bash :-) o long... bernd -- Please try to boot your system outside the system, it maybe the grounding problem. -- Um aus der Liste ausgetragen zu werden, eine Mail an majordomo@suse.com schicken, mit dem Text: unsubscribe suse-linux