As this community seems to be really nice so I thought I'd ask a question -
I have this little script but it won't just grep the timed out from the output:
#!/bin/bash
echo -n "Enter ntp server address: "
read SERVER
if ntpdc -n -c monlist $SERVER | grep "timed out"
then
echo "Server won't let You use monlist."
exit 0
else
echo "Server will let You use monlist."
fi
Any ideas? Thanks :)
ntpdc -n -c monlist $SERVERif you run it manually?