Put your code inside of the "CODE" tags please, it helps us read it.
What is the format of the file that you are checking the data from? Is it the same format as a standard /etc/passwd file?
Also what are you having trouble with specifically?
A suggestion would be to change your argument test, don't check to see if it equals one, check to see if it does not equal one and exit with a return code of 1 and print an error to stdout for the user to see. Would be a little bit cleaner.
Also, what is the point of:
echo "You should not see this line as output....."
Why do you have the else statement?