The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM



Thread: running test
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-06-2008
skooly5 skooly5 is offline
Read Only
 

Join Date: Apr 2008
Posts: 12
running test

--------------------------------------------------------------------------------

I am running a test command and if the user is not found you have to type exit and it wiil exit. Ok I did that. But if the user is found it is supposed to finger them. But my problem is it makes you type exit first then it fingers them. Why? whats wrong?

if [ -z username ]
then
error_fn
else
echo "Please try again or type exit to quit"
read exit"
if grep "$username" /etc/passwd
then
finger "$username"
fi
fi

I must have something switched around huh?
Forum Sponsor