[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bei Misserfolg 2 Befehle ausführen?



Hai,

Am 2009-06-11 10:22:04, schrieb Christian Knorr:
> Hallo Zusammen,
> ich versuche mich an ein Bash-Script, und möchte im Fehlerfall neben dem 
> exit-Level noch eine Meldung ausgeben. In diesem Fall funktioniert das:
> 
> test -x /usr/bin/xml_split || echo "FEHLER: ist 'xml-twig-tools' installiert?"
> test -x /usr/bin/xml_split || kdialog --error Fehler || exit 1

Sowas:

test -x /usr/bin/xml_split || ( echo "FEHLER: ist 'xml-twig-tools' installiert?" ;  kdialog --error Fehler || exit 1 )

ansondten nur in einem script mit:

if [ ! -x /usr/bin/xml_split ] ; then
  echo "FEHLER: ist 'xml-twig-tools' installiert?"
  kdialog --error Fehler || exit 1
fi

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    25.9V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/>                 Michelle Konzack
<http://www.can4linux.org/>                   Apt. 917
<http://www.flexray4linux.org/>               50, rue de Soultz
Jabber linux4michelle@jabber.ccc.de           67100 Strasbourg/France
IRC #Debian (irc.icq.com)                     Tel. DE: +49 177 9351947
ICQ #328449886                                Tel. FR: +33  6  61925193

Attachment: signature.pgp
Description: Digital signature


Reply to: