Last active
December 16, 2016 18:02
-
-
Save sloanlance/ace9bc62ab9322e9916bfa3311b4b876 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -- | |
# The macOS "defaults domains" command writes a comma-delimited list of domains to stdout. | |
# I wanted to get the domains as a list, one per line, without commas. | |
# Inspired by: | |
# http://stackoverflow.com/questions/723157/how-to-insert-a-newline-in-front-of-a-pattern | |
# http://stackoverflow.com/questions/17363030/how-do-i-insert-a-newline-linebreak-after-a-line-using-sed | |
# Default output | |
defaults domains | |
# com.apple.quicktimeplayer, com.apple.recentitems, com.apple.registration, com.apple.reminders, com.apple.scheduler, com.apple.screencapture | |
# Output with linebreaks | |
defaults domains | sed $'s/, /\\\n/g' | |
# com.apple.quicktimeplayer | |
# com.apple.recentitems | |
# com.apple.registration | |
# com.apple.reminders | |
# com.apple.scheduler | |
# com.apple.screencapture |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment