Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- if [[ $1 == "chrome" ]]
- then
- echo "Closing active tab of Google Chrome in $2 seconds."
- sleep $2
- osascript -e 'tell app "Google Chrome" to close active tab of front window'
- elif [[ $1 == "safari" ]]
- then
- echo "Closing active tab of Safari in $2 seconds."
- sleep $2
- osascript -e 'tell app "Safari" to close current tab of first window'
- fi
- echo "Done."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement