The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
the best way of editing .plist files mehow OS X (Apple) 1 01-21-2008 06:46 PM
Using 'defaults read' and storing the output in a variable davewg Shell Programming and Scripting 0 11-14-2007 08:04 AM
ls while read loop - internal read picking up wrong input dkieran Shell Programming and Scripting 2 05-14-2007 04:02 PM
Cannot read in variable using read on first try normie UNIX for Advanced & Expert Users 1 10-05-2005 02:42 AM
defaults httpd.conf macdonto IP Networking 5 09-25-2001 06:21 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 2.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-23-2008
davewg davewg is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 22
Question Using defaults read to get value from plist

Hi there,

I'm trying to retrieve a value from a plist file, which I have done before with no problems, however this plist file looks a little different....

Normally it's like this;
<plist version="1.0">
<dict>
key>KeyName</key>
<string>blah</string>

I want the value of KeyName, so 'defaults read com.example KeyName' returns the value "blah".

But the plist I'm having problems with is like this....
<plist version="1.0">
<dict>
key>HEADING</key>
<dict>
<key>KeyName</key>
<string>blah</string>

...and 'defaults read com.example KeyName' returns an error saying the domain/default pair does not exist.

Please can anyone advise if there is a way to retrieve this value?

Kind Regards
davewg
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:44 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0