On Fri, Oct 24, 2003 at 03:58:28PM +0200, Heino Tiedemann wrote:
> 
> Wie sieht eine Zeile aus, die erst testet, ob man online ist?, und
> nur, wenn die Antowrt "ja" lautet "mache fetchnews".
> 
> Heino
> 

pidof pppd >& /dev/null; ok_ppd=$?

# short:
[ $ok_ppd -ne 0 ] && echo "PPP not online" || fetchnews

# long:
if [ $ok_ppd -eq 0 ]; then
        fetchnews
else
        echo "PPP not online"
fi


-- 
Haeufig gestellte Fragen und Antworten (FAQ): 
http://www.de.debian.org/debian-user-german-FAQ/

Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED]
mit dem Subject "unsubscribe". Probleme? Mail an [EMAIL PROTECTED] (engl)

Antwort per Email an