I'm having a strange behaviour with a shell script on Ubuntu 12.04.1 LTS.
My script is scheduled to be launched every hour (in crontab). It uses /bin/bash, but sometimes it switches to /bin/sh without any reason.
Here are some portions of the env command that I'm logging from within the script.
The correct one is:
The wrong one that sometimes occurs is:
The problem is that I'm losing the PATH variable and I gets an error when I try to run a command.
Any hint? Thanks!