I need cron to run a script that manipulates huge numbers, and shell can't. So I installed bash and if I run the script from console it's ok. But when cron launch it no matter what indication I put on the first line (i.e. #!/opt/bin/bash) is still uses default shell.
Bash is on a remote location so I can't change user default shell in /etc/passwd. Besides I'm not sure of the compatibility with other shell scripts.
For instance if I run this
Code:
#!/opt/bin/bash
var=`expr 14680064000 / 1024 / 1024`
echo $var > /mnt/output
in console I get 14000
and with cron I get 2047.
p.s.:I did change shell path in crontab .. but still nothing. I even tried "screen -rms /opt/bin/bash /mnt/test" in cron. I'm clueless ...