User:Vvinogra

From ICO wiki
Revision as of 11:39, 11 May 2011 by Vvinogra (talk | contribs) (Created page with '==Bash Quests== ===Quest 12=== <source lang="bash"> #!/bin/bash #Autor: Vadim Vinogradin A21, vvinogra@itcollege.ee #Versioon 0.1 #Teha skript is_group.sh mis kontrollib, kas ka…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Bash Quests

Quest 12

#!/bin/bash
#Autor: Vadim Vinogradin A21, vvinogra@itcollege.ee
#Versioon 0.1
#Teha skript is_group.sh mis kontrollib, kas kasutaja eksisteerib.
KASUTAJA=$1
# kontrollib, kas kasutaja on olemas (kui jah - siis näitab "0", kui ei ole - "1")
if [ $(getent group $KASUTAJA ) ]; then
        echo "0"
else
echo "1"
fi