Skip to main content

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!

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!


That worked. Thank you!!