- 论坛徽章:
- 0
|
回复 xiaopan3322
谢谢,第一种方法 哈哈
go2moon2010 发表于 2011-07-31 22:56 ![]()
刚刚讨论了一下,比较保险的方法是用第二种……
第一种有可能失败的,原因是因为不同的版本,有可能对 -- 识别不了,
实际上,--的作用和 ./的作用相同:都是为了让 - 这个dash符号不被解释成命令选项:
Many meta-characters such as semicolons, spaces, backslashes, dollar signs, question marks, and asterisks are characters that are interpreted under Unix as commands.
- or -- interpreted as an option passed to the command.
The -- delimit the option list. Later arguments, if any, are treated a operands even if they begin with - or --. This applies to all commands such as rm, cp, mv, ls, ln and so on
另外,--并不是所有的命令都能识别的,比如echo就不能…… |
|