Skip to content

Instantly share code, notes, and snippets.

@oconnoat
Created April 18, 2014 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oconnoat/11031693 to your computer and use it in GitHub Desktop.
Save oconnoat/11031693 to your computer and use it in GitHub Desktop.
Short shell script to get the url for a homebrew package and open it in google chrome in the background
#!/bin/bash
brew info $1 | sed -n '2p' | xargs open -g -a "Google Chrome"
#Get the Package info from brew for the first argument
# and pipe it to
#sed which outputs only the second line
# and pipe it to
# xargs calling open with options to background the app, the app named "Google Chome" and the url is appended
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment