SHARE
TWEET

Untitled

a guest Dec 31st, 2015 143 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env bash
  2. if [[ $1 == "chrome" ]]
  3. then
  4.   echo "Closing active tab of Google Chrome in $2 seconds."
  5.   sleep $2
  6.   osascript -e 'tell app "Google Chrome" to close active tab of front window'
  7. elif [[ $1 == "safari" ]]
  8. then
  9.   echo "Closing active tab of Safari in $2 seconds."
  10.   sleep $2
  11.   osascript -e 'tell app "Safari" to close current tab of first window'
  12. fi
  13. echo "Done."
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top