Bash

Aus Programmers Guide

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Roy (Diskussion | Beiträge)
(Die Seite wurde neu angelegt: „== Prüfen ob die Variable leer ist == <source lang="bash"> PROXY=$(cat /etc/proxy) if [ -z "$PROXY" ] then #isempty echo "noProxy" else #notempty echo "goProxy…“)

Aktuelle Version vom 10:09, 21. Okt. 2010

Prüfen ob die Variable leer ist

PROXY=$(cat /etc/proxy)
if [ -z "$PROXY" ]
then
#isempty
echo "noProxy"
else
#notempty
echo "goProxyGoGoGo"
fi
exit 0
Persönliche Werkzeuge