Advertisement
Guest User

Untitled

a guest
Dec 31st, 2015
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  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."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement