Skip to content

Instantly share code, notes, and snippets.

@Raidok
Last active December 31, 2015 03:38
Show Gist options
  • Save Raidok/7928515 to your computer and use it in GitHub Desktop.
Save Raidok/7928515 to your computer and use it in GitHub Desktop.
Parsib https://rent.elmo.ee lehelt välja rendipunktid ja neis olevad vabad autod
#!/bin/sh
ON1=`echo "\033[44m\033[37m"`
ON2=`echo "\033[34m"`
OFF=`echo "\033[0m"`
curl https://rent.elmo.ee 2>&1 | sed -n "/metronic_v1.1/,/END JAVASCRIPTS/p" | sed -n -e "s/.*title: \"\(.\+\)\".*/\n$ON1\1$OFF/p" -e "s/.*car_fullname='\" + \"\(.\+\)\" + \"' car_battery='\" + \"\(.\+\)\" + \"' val='\".*/\1 $ON2\2%$OFF/p"
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment