Posted on 10-10-2014 01:58 PM
I am trying to collect a string from the OEAO plist. The script I wrote works via ARD, but does not work as an EA in Casper. Any ideas as to what I am doing wrong? Is there a better way to collect the string for the destinationFolder Key?
#!/bin/sh
loggedInUser=/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'
/usr/libexec/PlistBuddy -c "print :destinationFolder" /Users/$loggedInUser/Library/Preferences/com.softhing.oeao3.plist
Thanks!
Solved! Go to Solution.
Posted on 10-10-2014 04:03 PM
For extension attributes you will need to put the output in between results tags.
echo "<result>$result</result>"
So something like this:
#!/bin/sh
loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
destinationFolder=`/usr/libexec/PlistBuddy -c "print :destinationFolder" /Users/$loggedInUser/Library/Preferences/com.softhing.oeao3.plist`
echo "<result>$destinationFolder</result>"
Good luck!
Posted on 10-10-2014 04:03 PM
For extension attributes you will need to put the output in between results tags.
echo "<result>$result</result>"
So something like this:
#!/bin/sh
loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
destinationFolder=`/usr/libexec/PlistBuddy -c "print :destinationFolder" /Users/$loggedInUser/Library/Preferences/com.softhing.oeao3.plist`
echo "<result>$destinationFolder</result>"
Good luck!
Posted on 10-14-2014 06:21 AM
That worked. Thank you!!