Hey, I have been fighting with this SIMPLE script for a while, and almost going to crazy!!
what I am doing is just get the
DNS name for an IP, then echo the result,
under bash shell, I can do this using command line, without any problem,
$ a=`/usr/sbin/dig +short -x 216.239.37.104`
$ echo $a
va-in-f104.google.com.
Ok, so I wrote this in a script, ran it, no problem,
BUT , as long as I use cron to run this simple script, it give me nothing!
$ more /tmp/test.sh
#!/bin/bash
a=`/usr/sbin/dig +short -x 216.239.37.104`
echo "just confirm crontab execute this script" > /tmp/result
echo $a >> /tmp/result
$ more /tmp/result
just confirm crontab execute this script
$
what is the problem?