Mailinglisten-Archive |
am Fri, dem 20.04.2001, um 14:22:07 +0200 mailte Coolcat folgendes:
> hallo liste!
>
> folgendes problem:
>
> ich rufe ein query aus der shell heraus auf
>
> wie kann ich den fehler auswerten wenn einer auftritt
>
> im guten alten msdos gabs ja onerror
>
> nur ich finde bezüglich errorhandling aus einem shell script auch nicht in
> der docu
>
> vorstellen würd ich mir
>
> if query = error then bla else bla
>
man bash sagt:
The control operators && and || denote AND lists and OR
lists, respectively. An AND list has the form
command && command2
command2 is executed if, and only if, command returns an
exit status of zero.
An OR list has the form
command || command2
command2 is executed if and only if command returns a non-
zero exit status. The return status of AND and OR lists
is the exit status of the last command executed in the
list.
was man bash noch verrät:
if list; then list; [ elif list; then list; ] ... [ else
list; ] fi
The if list is executed. If its exit status is
zero, the then list is executed. Otherwise, each
elif list is executed in turn, and if its exit sta
tus is zero, the corresponding then list is exe
cuted and the command completes. Otherwise, the
else list is executed, if present. The exit status
is the exit status of the last command executed, or
zero if no condition tested true.
Und das nächste mal bitte mit Realnamen im Header. Hans Theo, bitte eins
weiterzählen.
Andreas
--
Diese Message wurde erstellt mit freundlicher Unterstützung eines frei-
laufenden Pinguins aus artgerechter Freilandhaltung. Er ist garantiert
frei von Micro$oft'schen Viren. (#97922 http://counter.li.org)
Was, Sie wissen nicht, wo Kaufbach ist? : N 51.05082°, E 13.56889° ;-)
---
*** Weitere Infos zur Mailingliste und MySQL unter http://www.4t2.com/mysql
php::bar PHP Wiki - Listenarchive