Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3902426
  • 博文数量: 534
  • 博客积分: 10470
  • 博客等级: 上将
  • 技术积分: 4800
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-26 14:08
文章分类

全部博文(534)

文章存档

2021年(1)

2019年(1)

2017年(1)

2016年(2)

2013年(2)

2012年(10)

2011年(43)

2010年(10)

2009年(17)

2008年(121)

2007年(253)

2006年(73)

分类: LINUX

2008-10-24 18:44:43

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: 

阅读(3334) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~