Chinaunix首页 | 论坛 | 博客
  • 博客访问: 123657
  • 博文数量: 34
  • 博客积分: 1201
  • 博客等级: 少尉
  • 技术积分: 365
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-21 08:56
文章分类

全部博文(34)

文章存档

2012年(1)

2011年(15)

2010年(18)

我的朋友

分类:

2010-10-29 09:37:14

退出状态
sed不向grep一样,不管是否找到指定的模式,它的退出状态都是0。只有当命令存在语法错误时,sed的退出状态才不是0。
对文件所属主owner的影响
一直以为sed -i只是对文件编辑,不会影响文件的权限,最近才知道会改变文件的owner,会改成当前用户的owner, 在ws3.0上会有这种情况,在centos4.4或更高的版本不会产生这样的问题
[root@CT53-64b logs]# sed --version
GNU sed version 4.1.5
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
14:31
[root@WAPI01 ~]# sed --version
GNU sed version 4.1.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
 14:31
[root@jsz1wl044 tmp]# sed --version
GNU sed version 4.0.7
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
阅读(1112) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-10-29 20:34:14

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com