I have written a script which runs well in command prompt as root,but it gives a different o/p when scheduled in cron job.
The script redirects the o/p to a file and compares it with another file.It returns all ok if there are no difference else returns the difference.
When i run this in CLI as root its all ok but in cronjob it gives differences.Please advice