Thursday, April 25, 2013

Prayer Times

A simple shell script that will fetch prayer times from raajeislam.com.


Fajr    : 4:42
Sunrise : 5:55
Duhr    : 12:08
Asr     : 3:21
Maghrib : 6:13
Isha    : 7:27



--> #!/bin/bash
wget -O /tmp/prayertimes http://raajjeislam.com/prayertimes/ &>/dev/null

awk '
BEGIN{
FS="(>)|(<)";
}

/(Fajr|Sunrise|Duhr|Asr|Maghrib|Isha)<\/div>/ {
        printf("%-8s: %s\n", $5,$9);
}

' /tmp/prayertimes


Wednesday, April 10, 2013