Hi All,
Below is the very simple code snippet but it si giving me syntax error
#!/bin/bash
#To ensure If JMS directory exists or not
ServerName=$(hostname)
#To ensure If JMS directory exists or not
echo $ServerName
if [ "$ServerName" = "usei01" || "$ServerName" = "usei02" || "$ServerName" = "usei03" ];
then
echo "Inside First If"
if [ -d /opt/shared -a -w /opt/shared/data/jms ];
then
echo 'JMS mounts................exist'>>OutputResult.txt
else
echo "JMS mounts................not exist">>OutputResult.txt
fi
echo "Outside IF"
fi
It is not reading the else and syntax error at line 7 which is my first If clause.