Is it possible to replace the path to an executable with a variable?
CFBuildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBuildNumber" $buildPlist)
This is what I want to do, but I think I am messing the syntax up
buddyPath = /usr/libexec/PlistBuddy
CFBuildNumber=$($buddyPath -c "Print CFBuildNumber" $buildPlist)
Executing a command whose name is in a variable should work fine, but you can’t set a variable that way. Use
without spaces around the
=.