# cat << EOF > pnrdata lccp_pnrno1=MYPNRNO EOF # cat pnrdata lccp_pnrno1=MYPNRNO # url=http://www.indianrail.gov.in/cgi_bin/inet_pnrstat_cgi.cgi # lynx -post_data $url < ./pnrdata | grep -A32 PNR | grep "Passenger [0-9]" Passenger 1 W/L 114,GNWL W/L 21
wget --user-agent="Myscript 1.0;" \ --header="Content-Type: application/x-www-form-urlencoded" \ --post-data="lccp_pnrno1=MYPNRNO" \ "http://www.indianrail.gov.in/cgi_bin/inet_pnrstat_cgi.cgi" -O- 2>/dev/null \ | grep -A2 "Passenger 1" <TD class="table_border_both"><B>Passenger 1</B></TD> <TD class="table_border_both"><B>W/L 114,GNWL </B></TD> <TD class="table_border_both"><B>W/L 21</B></TD>
Reference:
http://wiki.linux-delhi.org/cgi-bin/twiki/view/Main/LinuxTricks
http://akhileshss.blogspot.com/2008/09/script-to-periodically-check-pnr-status.html
