|
|
1
18
的源代码
由此我得出结论,他们的行为完全相同,但是
|
|
|
2
9
它们的存在似乎都是由于遗留的原因,以便在不同版本的unix之间兼容。您应该能够使用其中任何一个,因为他们做了完全相同的事情,但要注意,如果您运行的系统不符合最新的标准,它可能缺少一个或另一个。 两种形式都出现在 Single Unix Specification version 3/POSIX 2004 ,无需注意:
根据
-h file True if file exists and is a symbolic link. This operator
is retained for compatibility with previous versions of
this program. Do not rely on its existence; use -L instead.
显然,
some versions of Solaris
|
|
|
3
2
没有区别,它们完全一样。它们可能是为了统一不同的 测试 posix之前的实现。 |
|
|
4
1
Fedora的手册上说
|
|
|
Plankt0n · Shell,执行一个需要逐一遍历多个值的命令 1 年前 |
|
|
Fin · 如何使用bash从表中提取数据 1 年前 |
|
|
aenagy · Bash声明不喜欢带空格的值 1 年前 |
|
PkDrew · AND运算符“&”在“&tee”中的作用是什么? 1 年前 |
|
|
elbarna · 正则表达式仅排除小写字符串,但保存包含大写的字符串 1 年前 |
|
Harry · 使用“$!”获取后台作业的pid 1 年前 |
|
|
nmr · 使用来自另一个shell脚本的if语句的返回码函数 1 年前 |
|
minseong · Git sed忽略二进制文件 2 年前 |
|
|
Jesper.Lindberg · 检查参数是否包含null 2 年前 |