Created
January 22, 2012 00:53
-
-
Save cdwilson/1654841 to your computer and use it in GitHub Desktop.
Fix mail.app plists to sort all mailboxes by date in descending order
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/bash | |
: ${MAILDIR:="$HOME/Library/Mail"} | |
find "$MAILDIR" -type f -name Info.plist -print0 | xargs -0 perl -i -pe 'BEGIN{undef $/;} s/\t<key>SortedDescending<\/key>\n\t<string>NO<\/string>/\t<key>SortedDescending<\/key>\n\t<string>YES<\/string>/smg' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment