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:
阅读(3360) | 评论(0) | 转发(0) |