Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash if not

if ! [ $(cat /etc/passwd | grep "sysa") ]; then
        echo "ERROR - The user sysa could not be looked up"
        exit 2
fi
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bash
ADD COMMENT
Topic
Name
7+8 =