Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'script here' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
script here
Authored by: GlowingApple on May 11, '05 02:23:29PM
I often work in Terminal and enjoy the ease of sudo. So it's usually much easier for me to work with plist files in nano rather than opening a graphical app. For anyone who's interested, here's a simple script to convert a plist file, open it in nano, and then convert it back to the default binary format.

#!/bin/bash

plutil -convert xml1 ${1}
nano -w ${1}
plutil -convert binary1 ${1}
Just paste this in a file, chmod +x the file, and copy it to a location easy to access. I named mine pledit and copied it to /usr/local/bin.

---
Jayson --When Microsoft asks you, "Where do you want to go today?" tell them "Apple."

[ Reply to This | # ]

script here
Authored by: Hal Itosis on Jun 19, '05 06:56:43AM
Outstanding comment!!!

All I need do is type
pled /path/to/.plist
and the script does
all the conversions.

Cool. (works great)

Thanks Quantum0726,

-HI-

[ Reply to This | # ]
Use $EDITOR
Authored by: englabenny on Jun 19, '05 08:43:35AM
Put $EDITOR instead of nano, and that code will use any editor you've set up; for example, my $EDITOR is subethaedit.

[ Reply to This | # ]
script here
Authored by: jacobolus on Jan 14, '06 12:34:22AM
Or you can just stick this in your .bashrc

# to edit apple plist files:
function pledit {
plutil -convert xml1 ${1}
$EDITOR -w ${1}
plutil -convert binary1 ${1}
}


[ Reply to This | # ]