在 cat 的手册页中,-u 表示(忽略)
[raj@localhost zzz]$ cat file1
hello world
1 2 3 4 5 6 7 8 9 0
! @ # $ % ^ & * ( ) _ + ~ ` ; ' , .{ } [ ] = | \ / -
[raj@localhost zzz]$ cat -u file1
hello world
1 2 3 4 5 6 7 8 9 0
! @ # $ % ^ & * ( ) _ + ~ ` ; ' , .{ } [ ] = | \ / -
Run Code Online (Sandbox Code Playgroud)
我们什么时候应该使用 -u 选项?
它会忽略什么?
该选项-u是这样的,cat因此 Unix/Linux 是 POSIX 兼容的。该规范说:
The following option shall be supported:
-u Write bytes from the input file to the standard output without delay as each is read.
Run Code Online (Sandbox Code Playgroud)
实际上,cat这是自动执行的,并且无法将其关闭,因此该选项被接受但被忽略,因为它对行为没有影响。
| 归档时间: |
|
| 查看次数: |
871 次 |
| 最近记录: |