Code: Alles auswählen
#!/bin/sh
case "`cat /etc/passwd`" in
*user1:x:*)
if ! [ -d "/home/user1/" ]; then
mkdir user1
chown -R mc user1/
user=user1
else
if [ -f "/home/user1/DATEI.TXT" ]; then
case "`cat /etc/passwd`" in
*user2:x:*)
if ! [ -d "/home/user2/" ]; then
mkdir user2
chown -R user2 user2/
user=user2
else
if [ -f "/home/user2/DATEI.TXT" ]; then
echo "BLA"
else
user=user2
fi
fi
*)
echo "BLA" ;;
esac ;
else
user=user1
fi
fi ;;
*)
echo "BLA" ;;
esac ;
Code: Alles auswählen
Syntax error: ")" unexpected (expecting ";;")