Bash

Aus Programmers Guide

Wechseln zu: Navigation, Suche

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