Commit 5de19679 authored by Julius Wu's avatar Julius Wu

fix question 2

parent e4aceebd
#!/bin/bash #! /bin/bash
user = 'root' USER_NAME=root
cat /etc/passwd | grep ${USER_NAME} >/dev/null 2>&1
if [ $? -eq 0 ] ; then
echo ~`echo ${USER_NAME}`
grep -c '^$user' /etc/passwd else
\ No newline at end of file echo "User Not Found"
fi
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment