rfcn
Member level 2
Hi,
I'd like to find and replace some strings in a text file in Linux. It's a condition replace. For example, if there is "X=100" in a line, then replace 111 to aaa in the line. See bellow,
111222333,X=100
111222333,Y=100
111222333,Z=100
I want a script, the script will excute the find and replace and the text will convert to:
aaa222333,X=100
111222333,Y=100
111222333,Z=100
How to rearlize the script?
Thanks!
I'd like to find and replace some strings in a text file in Linux. It's a condition replace. For example, if there is "X=100" in a line, then replace 111 to aaa in the line. See bellow,
111222333,X=100
111222333,Y=100
111222333,Z=100
I want a script, the script will excute the find and replace and the text will convert to:
aaa222333,X=100
111222333,Y=100
111222333,Z=100
How to rearlize the script?
Thanks!