Quote:
Originally Posted by chinhth2010
Dear user
I want to write a shell.sh to replace a tring by other string in one file.
example: in my convert.gs file has a string as bellow
'set z 1'
Now I want to find this line and replace into 'set z 2'
Please anyone tell me how to do
Thank you
|
As sycamorex states, sed is what you are looking for. In this case, it would be
Code:
cat convert.gs | sed -e 's/set z 1/set z 2/g' > new-convert.gs
Jay