frankhunt wrote:
> Does the "at" scheduler use bash or dash?
>
> I have a shell script that runs just fine via cron or command line
> It generates errors if run via "at" and does not complete
> The errors seem to be related to the use of the "let" statement
> My test script fails the same way from command line if I include #!/bin/dash
> Runs fine with #!/bin/bash
> This leads me to believe that the at scheduler uses dash no matter what 
> is in the script file.
> Of course trying to google for anything with "at" in the search string 
> returns a zillion hits none of which
> are relevant.
>
> I am running Ubuntu 10.10
>
> Here's the test script it generates a random number of hours between 24 
> and 36 which is used in the real script at the offset to schedule itself 
> again via "at":
>
> #!/bin/bash
> MAX=36
> MIN=24
> number_hours=0
> while [ "$number_hours" -le $MIN ]
> do
> number_hours=$RANDOM
> let "number_hours %= $MAX"
> done
> echo "number_hours=" $number_hours
>
>
> Ideas??
>   
frankhunt
looks like dash might not like things like 'let' and 'expr', but seems 
to prefer the expression without these?
possibly putting the expression within ()
only a guess, as I have never used dash ... have you tried this?
Regards
Fred James

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to