ls的输出结果: 加管道符,重定向后后面的命令的命令输出按行处理的.
如:
[gan@localhost ~]$ ls
Desktop Download gan Pictures Public Videos
Documents g Music prog Templates
[gan@localhost ~]$ ls > g
[gan@localhost ~]$ cat g
Desktop
Documents
Download
g
gan
Music
Pictures
prog
Public
Templates
Videos
[gan@localhost ~]$ echo "`ls`"
Desktop
Documents
Download
g
gan
Music
Pictures
prog
Public
Templates
Videos
[gan@localhost ~]$ ls | awk '{print $0}'
Desktop
Documents
Download
g
gan
Music
Pictures
prog
Public
Templates
Videos
|
Ref:
阅读(3381) | 评论(0) | 转发(0) |