Created
June 10, 2018 23:33
-
-
Save ghidinelli/6221e0b126f934fdcd1b3b54074691da to your computer and use it in GitHub Desktop.
Open Chrome on Mac OSX to Google Flights with criteria pre-filled for batch searching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| [ "$#" -eq 1 ] || (echo "Destination airport code(s) (e.g. 'RNO' or 'RNO DEN') argument required" && exit 1) | |
| for destination in "$@" | |
| do | |
| for origin in SFO AVL,GSP AUS MKE MEM DEN ONT IAD | |
| do | |
| if [ "$destination" = "$origin" ]; then | |
| echo "No flight required for $origin -> $destination" | |
| else | |
| echo "Opening $origin -> $destination" | |
| echo "https://www.google.com/flights#flt=$origin.$destination.2018-09-16*$destination.$origin.2018-09-22;co:1;c:USD;e:1;sd:1;t:f" | |
| fi | |
| done | |
| done |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It also works to do
./teamtrip.bash ATL DEN MSYto check atlanta, denver and new orleans.