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.

substitution in c-shell script

Status
Not open for further replies.

vikas.m0502

Junior Member level 1
Junior Member level 1
Joined
May 11, 2012
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,389
I have one file :
mem_x mem_x
mem_x mem_x
...
mem_x mem_x

I want to change this to :
mem_1 mem_1
mem_2 mem_2
...
mem_n mem_n

I am trying it with csh script but it keeps giving some error.
Please help.
Thanks in advance.
 

This perl one liner will do it
perl -pi -e 's/x/$./g' <file_name>
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top