An Entrepreneur, Coach, IT Consultant, Strategic Adviser, and a Traveler craving to explore and contribute to forming a better society.

Thursday, December 4, 2008

Shell Scripting #3 - Login Validation

No comments :
Keywords: Linux, Shell Scripting, Scripts, BASH

Following code snippet shall be used to authentic the user before executing the shell program:

#!/bin/sh

read user
read pass

if [ $user == "username" ]
then
echo "Log-In Successful"
else
echo "Log-In Failed"
fi

Keywords: Linux, Shell Scripting, Scripts, BASH

No comments :