New answers tagged

1

It's a limitation of PlistBuddy that it can only read from a file, not from a pipe. Contructs like … | /usr/libexec/PlistBuddy /dev/stdin and /usr/libexec/PlistBuddy /dev/stdin <(…) use a pipe to plug the output of … into the input of PlistBuddy. You need to use a temporary file. But you can have the shell do it for you. Here-documents and here-strings ...


1

Use a here string to pass the output of diskutil to standard in. /usr/libexec/PlistBuddy -c "Print :MountPoint" /dev/stdin <<< "$(diskutil info -plist disk1s1)"


Top 50 recent answers are included