error using samba
writing a shell scipt on bash:
[ysm@edb ~]$ vi smb.sh
# Verify Availability
#WINHOST=YasirSualeh
#CONNECT=$(echo "Testing SAMBA Connectivity for $WINHOST " | smbclient -M $WINHOST)
if echo "Testing SAMBA Connectivity for $WINHOST " | smbclient -M YasirSualeh | grep -q "Connected"
then
echo "Well connected."
else
echo "Oops, Not Connected."
fi
it works well if there is a hard code server name (see if condition)
but once i add a variable(WINHOST) in place of server name it does not send message. any hint?
|