problem with bash script

Nils Kassube kassube at gmx.net
Sat Mar 8 18:46:42 UTC 2014


Paolo De Michele wrote:
> I have a problem with my bash script.
> this script will do a backup in a particular directory - look below:

[...]

> if I start this script.sh in my console
> # ./script.sh it works
> but if I schedule it in my crontab doesn't work

I suppose you didn't start the script with the line

#!/bin/bash

because then it will use bash when you start it from your console but it 
uses dash if you start it from cron.


Nils





More information about the ubuntu-users mailing list