分页: 1 / 1

sed的插入文本

发表于 : 2008-07-18 12:25
crossie
有一文件match_chinese

代码: 全选

#!/bin/bash
chinese="把百度设为首页"
english="set baidu as home page"
#grep '[\u4e00-\u9fa5]*' `basename $0`
grep '[\x80-\xff]' `basename $0`
输入命令

代码: 全选

cat match_chinese | sed -n '/grep/a\ll'
我期待输出

代码: 全选

#grep '[\u4e00-\u9fa5]*' `basename $0` ll
grep '[\x80-\xff]' `basename $0`ll
它却只输出

代码: 全选

ll
ll
为什么啊?
谢谢[/code]

发表于 : 2008-07-18 13:16
xiooli
try

代码: 全选

cat match_chinese | sed 's/grep.*$/&II/'
?