Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ghidinelli/6221e0b126f934fdcd1b3b54074691da to your computer and use it in GitHub Desktop.

Select an option

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
#!/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
@ghidinelli
Copy link
Author

It also works to do ./teamtrip.bash ATL DEN MSY to check atlanta, denver and new orleans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment