1234567891011 |
- #!/bin/sh
- PATH=/usr/bin/:$PATH
- { crontab -l | grep -v sct ; /usr/lib/plan9/bin/astro -k | awk 'BEGIN {cnt_s=0; out=0}
- /light/{out=1; append=" 3500"; $5=$4}
- /sun/{cnt_s++; out=1; append=" 4000"; if ( cnt_s != 1) append=""}
- { gsub(":"," ",$5); $0=$5;
- 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 }';
- } | cat
- # | crontab -
|