开发者

Does any one how to execute this cmd through shell script?

开发者 https://www.devze.com 2023-03-01 07:57 出处:网络
Does any one know how to execute below cmd through shell scri开发者_JS百科pt? #!/bin/sh USERNAME=\"XYZ\"

Does any one know how to execute below cmd through shell scri开发者_JS百科pt?

#!/bin/sh

USERNAME="XYZ"

defaultCmd=`defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions "{ \"USERNAME\" = \"${USERNAME}\" ;}" `

where write com.apple.Xcode is a .plist file. The above command works perfectly on terminal.


@shelter was right - the above command run without '...' and should not be captured any value in the script. But one thing need to be noted that script should not run as "root" user otherwise this command would have no effect.

defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions "{ \"USERNAME\" = \"${USERNAME}\" ;}"
0

精彩评论

暂无评论...
验证码 换一张
取 消