Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4241300
  • 博文数量: 1148
  • 博客积分: 25453
  • 博客等级: 上将
  • 技术积分: 11949
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-06 21:14
文章分类

全部博文(1148)

文章存档

2012年(15)

2011年(1078)

2010年(58)

分类: LINUX

2011-10-03 21:40:59

colrm First [Last]
使用该命令如果不使用参数,则不会删除任何列,而只是将内容输出到标准设备中。

ywx@ywx:~/Desktop/test$ colrm
hello linux               输入hello linux字符串
hello linux               输出刚才输入的字符串hello linux
^C
ywx@ywx:~/Desktop/test$ colrm 4
hello linux               删除第4列之后的所有内容
hel
^C
ywx@ywx:~/Desktop/test$ colrm 4 6
hello linux              删除第4列到第6列之间的内容
hellinux
^C

ywx@ywx:~/Desktop/test$ colrm 4 6 < testfile > testfile1
ywx@ywx:~/Desktop/test$ cat testfile
hello linux
linux is a free unix-like operating system.
this is a linux testfile.
linux.
ywx@ywx:~/Desktop/test$ cat testfile1
hellinux
linis a free unix-like operating system.
this a linux testfile.
lin

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