Hi,
It may be simple ... but am not getting a break here...Any help would be really appreciated...
I want to validate couple of variables before i execute a command
Here is the scenario
Code:
count=' ${NAME_SRC_PATH} | grep "^${name}\/$" | wc -l`
if [ $count -eq 0 ];
then
echo "Error Creating ${name} "
exit 1
else
echo "Name Created."
fi
Now i want to check some 5 more src_path .. how can i chk that... ?
Say like NAME_SRC_PATH1,NAME_SRC_PATH2.NAME_SRC_PATH3,NAME_SRC_PATH4,NAME_SRC_PATH5...
the paths are declared by me only ...and if the name exists in NAME_SRC_PATH3 .. it should return name exits is 3...likewise..for all...
i understand its simple... am totally blank now... any pointer would be helpful....