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


Click here to return to the '10.4: Edit and save binary plist files in emacs, revisited' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Edit and save binary plist files in emacs, revisited
Authored by: ghinteclinn on Jun 28, '05 04:41:12PM

plutil has -o which specifies an alternate output file (plutil normally operates in place). To cheat a plutil filter I'd do it something like this:

#!/bin/sh
pltmp=/tmp/pltmp-$$
plutil -convert xml1 -o ${pltmp} $1
cat ${pltmp}
rm -f ${pltmp}



[ Reply to This | # ]
10.4: Edit and save binary plist files in emacs, revisited
Authored by: popguru on Jun 28, '05 08:23:50PM

That should work too. Note that your script will only work for opening a binary .plist file as text; to save a file you're editing as text to binary format, you'd need to write another version of the script which uses binary1 instead of xml1.

The cleanup of the temporary file is a good idea...I think I'll add it to my script. :)

[ Reply to This | # ]

10.4: Edit and save binary plist files in emacs, revisited
Authored by: shideg on Jul 19, '05 04:20:15PM

What about

#!/bin/sh
plutil -convert xml1 -o /dev/stdout $1



[ Reply to This | # ]