shell脚本语言里的 --是什么意思

awful199baayng 2015-07-21 02:08:52
就是这一句
$BUNDLER list.txt --options_file options.txt > bundle/out


...全文
377 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
fly 100% 2015-07-22
  • 打赏
  • 举报
回复
关键字的一部分应该是为了匹配方便区分关键字用的
brookmill 2015-07-22
  • 打赏
  • 举报
回复
类似的例子: $ man head ...... -n, --lines=[-]K print the first K lines instead of the first 10; with the leading `-', print all but the last K lines of each file 这里的 --lines=3 应该就相当于 --options_file options.txt $ head --lines=3 test.c #include <stdio.h> #include <pthread.h> #include <unistd.h>
brookmill 2015-07-22
  • 打赏
  • 举报
回复
我猜的:--options_file的意思是说,把后续的参数作为配置文件,而options.txt就是这个配置文件。“ --options_file options.txt”这两个是一组。list.txt应该和--options_file没有直接关系。 就像 gcc hello.c -o hello ,正好一一对应: gcc 对应 $BUNDLER hello.c 对应 list.txt -o 对应 --options_file hello 对应 options.txt
awful199baayng 2015-07-22
  • 打赏
  • 举报
回复
引用 5 楼 lishanchao 的回复:
这个是程序接受的长选项。 Unix/Linux下程序的参数,很多可以通过长选项,或短选项来传递。 对应有两个函数专门处理此事:getopt()和getopt_long()。
我的意思是 list.txt--options_file 是什么意思?这只是一个参数吗? --options_file 和 list.txt的关系,或者那个双横线符号 - - 是什么意思
awful199baayng 2015-07-22
  • 打赏
  • 举报
回复
引用 4 楼 p569354158 的回复:
这个你得看你的那个程序了,它接收了这个参数具体干了什么只有看文档才知道
我的意思是 list.txt--options_file 是什么意思?这只是一个参数吗?
沭水河畔 2015-07-21
  • 打赏
  • 举报
回复
这个是程序接受的长选项。 Unix/Linux下程序的参数,很多可以通过长选项,或短选项来传递。 对应有两个函数专门处理此事:getopt()和getopt_long()。
lucky-lucky 2015-07-21
  • 打赏
  • 举报
回复
这个你得看你的那个程序了,它接收了这个参数具体干了什么只有看文档才知道
awful199baayng 2015-07-21
  • 打赏
  • 举报
回复
@p569354158 大侠,list.txt --options_file里的 list.txt--options_file是什么意思,--options_file
awful199baayng 2015-07-21
  • 打赏
  • 举报
回复
引用 1 楼 p569354158 的回复:
BUNDLER应该是个环境变量 使用 echo $BUNDLER 看一下具体是什么 这一句话的意识是执行BUNDLER变量所指定的程序,并传入参数为 list.txt --options_file options.txt 最后将该程序打印的信息全部保存到bundle/out文件当中
你好传入的参数为list.txt --options_file 和options.txt ,意思是两个参数?那么--options_file 是什么意思
lucky-lucky 2015-07-21
  • 打赏
  • 举报
回复
BUNDLER应该是个环境变量 使用 echo $BUNDLER 看一下具体是什么 这一句话的意识是执行BUNDLER变量所指定的程序,并传入参数为 list.txt --options_file options.txt 最后将该程序打印的信息全部保存到bundle/out文件当中

4,436

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧