Finding the mountpoint of an device in shell scripts
Use a here string to pass the output of diskutil to standard in.
/usr/libexec/PlistBuddy -c &quot;Print :MountPoint&quot; /dev/stdin &lt;&lt;&lt; &quot;$(diskutil info -plist disk1s1)&quot;