Skip to content

Instantly share code, notes, and snippets.

@atlefren
Last active December 14, 2015 11:59
Show Gist options
  • Select an option

  • Save atlefren/5082997 to your computer and use it in GitHub Desktop.

Select an option

Save atlefren/5082997 to your computer and use it in GitHub Desktop.
#!/bin/sh
q=""
if [ $1 = "hjem" ]
then
q="rotvoll vestlia"
elif [ $1 = "sentrum" ]
then
q="rotvoll sentrum"
else
for var in "$@"
do
q+="$var "
done
fi
echo "Asking bussTUC: $q"
curl -d "service=routeplannerOracle.getOracleAnswer&question=$q" https://www.atb.no/xmlhttprequest.php
echo ""
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment