Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

AT command and bash versus dash . . .

  Date: Nov 26    Category: Unix / Linux / Ubuntu    Views: 287
  

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??

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on AT command and bash versus dash . . . Or get search suggestion and latest updates.




Tagged: