krisdigitx Asked: 2011-09-27 09:01:24 +0800 CST2011-09-27 09:01:24 +0800 CST 2011-09-27 09:01:24 +0800 CST sed search line and replace only text in that line 772 i want to use sed to replace any x(small) to 0 if the line contains Z(capital) x,Z,y y,X,z, Y,z,x x,Z,y linux sed 1 Answers Voted Best Answer quanta 2011-09-27T09:06:23+08:002011-09-27T09:06:23+08:00 $ sed '/Z/s/x/0/g' <input_file>
1 Answers