使用道具 举报
最初由 5sky 发表 没明白!请指点一下 cat aa.txt | sed '/abcde/{N;s/\n//}' sed: -e expression #1, char 17: Unknown option to 's'
cat aa.txt | sed '/abcde/{N;s/\n//}'
如果去掉N;
[public@xiaocong temp]$ cat file abc de fg hij [public@xiaocong temp]$ cat file|sed -e '/.*/{N;s/\n//}' abcde fghij [public@xiaocong temp]$ cat file|sed -e '/.*/{s/\n//}' abc de fg hij
Post by xiaocong213 编成 sed -e '/.*/{s/\n//}' 效果是不对文件做任何改动,为什么不是把所有行连成一行了?
Post by seablue This is a test, hello ok the bottom. 期望的结果: This is a test, hello ok the bottom. 如果是这样便不好用xargs了
本版积分规则 发表回复 回帖后跳转到最后一页