将可选程序参数添加到 plist 的正确方法是什么?
此命令行用法语句显示在 运行 Cassandra wiki 页面底部附近。
bin/cassandra [-f] [-h] [-p pidfile]
下面是适用于 Mac OS X 10.6.x 的 Cassandra plist 文件的示例。为了简洁和清晰起见,我仅引用了示例的程序参数数组。
...
<array>
<string>/opt/local/bin/cassandra</string>
<string>-h</string>
</array>
...
现在,当涉及到将可选的 [-p pidfile] 参数添加到程序参数数组时,将字符串节点写为是否正确?
<string>-p</string>
<string>/usr/local/apache/cassandra/0.7.5/runtime/pid.txt</string>
还是作为?
<string>-p /usr/local/apache/cassandra/0.7.5/runtime/pid.txt</string>
This command line usage statement is displayed near the bottom of the Running Cassandra wiki page.
bin/cassandra [-f] [-h] [-p pidfile]
Below it, is an example of a Cassandra plist file for Mac OS X 10.6.x. I’ve only quoted the example’s array of the program arguments for the sake of brevity and clarity.
...
<array>
<string>/opt/local/bin/cassandra</string>
<string>-h</string>
</array>
...
Now, when it comes to adding the optional [-p pidfile] arguments to the program arguments’ array, is it proper to write the string nodes as?
<string>-p</string>
<string>/usr/local/apache/cassandra/0.7.5/runtime/pid.txt</string>
Or as?
<string>-p /usr/local/apache/cassandra/0.7.5/runtime/pid.txt</string>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
前者。如果您省略空格,并且
cassandra
使用与 POSIXgetopt()
兼容的内容,后者应该可以工作。The former. The latter should work if you omit the space, if
cassandra
uses something compatible with POSIXgetopt()
.