sun 431 B

1234567891011
  1. #!/bin/sh
  2. PATH=/usr/bin/:$PATH
  3. { crontab -l | grep -v sct ; /usr/lib/plan9/bin/astro -k | awk 'BEGIN {cnt_s=0; out=0}
  4. /light/{out=1; append=" 3500"; $5=$4}
  5. /sun/{cnt_s++; out=1; append=" 4000"; if ( cnt_s != 1) append=""}
  6. { gsub(":"," ",$5); $0=$5;
  7. if ( out==1 ) printf("%s %s * * * export XAUTHORITY=/home/lich/.Xauthority && DISPLAY=:0; /usr/bin/sct%s > /dev/null\n", $2, $1, append); out=0 }';
  8. } | cat
  9. # | crontab -