Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Find and replace in Linux text file

Status
Not open for further replies.

rfcn

Member level 2
Member level 2
Joined
Jun 18, 2010
Messages
42
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,288
Location
China
Visit site
Activity points
1,531
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!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top