Sunday, March 25, 2007

Bash Script

Heres a simple script I needed to execute if user found in
passwd file and if user not found in passwd file.

[root@unixguy scripts3]# cat verify.sh
#!/bin/bash -x

if grep $USER /home/sriram/scripts3/pass.txt;
then
#If user is found
perl script.pl;
else
#If user Not found
bash script.sh;
fi
[root@unixguy scripts3]#

No comments: