如何解释bash命令“用法”语法?

前端之家收集整理的这篇文章主要介绍了如何解释bash命令“用法”语法?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
例如,你究竟如何解释命令“usage”输出输出. @H_404_1@例如,在我的OS X上,cp给了我

  1. usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
  2. cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
@H_404_1@>嵌套选项(如-H在-R中)表示什么?
>大小写有什么意义吗?
>什么时候参数是可选的,必需的?

@H_404_1@我需要针对我的程序实现一个telnet命令行,我想直截了当.

对于任何想要了解输出用法意味着什么的人来说,最好的办法就是男人. @H_404_1@认真地:-)花时间学习惯例,这真的很有帮助.

  1. The following conventions apply to the SYNOPSIS section and can be used
  2. as a guide in other sections.
  3.  
  4. bold text type exactly as shown.
  5. italic text replace with appropriate argument.
  6. [-abc] any or all arguments within [ ] are optional.
  7. -a|-b options delimited by | cannot be used together.
  8. argument ... argument is repeatable.
  9. [expression] ... entire expression within [ ] is repeatable.

猜你在找的Bash相关文章