Tuesday 28 July 2009

Alarm - Update

Due to a bug with DCoP, I had to slightly change the script so that it works always. I had to use sed as well this time. I also licenced it.
So, here again is my crontab file:
http://files.getdropbox.com/u/289093/crontab

And so, here is the alarm script again:
http://files.getdropbox.com/u/289093/alarm
Hope you enjoy this.

Ps. I know I am no he best sed user but, at least now this works.

Update: Volume goes to 60% not 80.

Update 2: Due to a bug within crontab, it s necessary to have a blank new line at the end. Otherwise, crontab will load well but the last command will not execute.

2 comments:

  1. Hi.

    Why don't make the script use the relative ~ path, or the `whoami` shell escape, or the $HOME var, so it will work for others without change, think in portability, and you can change the repeated lines with a "for" or something more clean.

    Like:

    [code]
    for i in $(seq 1 20); do { echo volume up; sleep 1m; } done;
    [/code]

    Think in function defining for bash.

    ReplyDelete
  2. Sure, there are lots of wrong things in my code. I want others to make it better.

    ReplyDelete