Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以用变量替换可执行文件的路径?
CFBuildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBuildNumber" $buildPlist)
这就是我想做的,但我想我把语法弄乱了
buddyPath = /usr/libexec/PlistBuddy CFBuildNumber=$($buddyPath -c "Print CFBuildNumber" $buildPlist)
执行名称在变量中的命令应该可以正常工作,但是您不能那样设置变量。利用
buddyPath=/usr/libexec/PlistBuddy
周围没有空格=。
=