Hi Guys,
I need to edit a netlist. it is a text file that contain many lines, that are dont have a certain order.
I need to find the word ( string) net. the problem is that one time it can be net01 or net56 or any other combination of the word net with any number between 0 to 1000000.
I need is to use awk to:
1. find the field number in which the word net**** appear for every
line ( might be more than one in a row)
2. insert an empty line after every line that contain net**
3. in the empty line I need to add the next string :
R_par(net** gnd) res r=1
note: if the word net** appears twice in a line, I need to add two
empty lines and each one to add the apropiate string.
the main problem is how to retrive the field number in which the word net** appear.
thanks for your help!
meny
I need to edit a netlist. it is a text file that contain many lines, that are dont have a certain order.
I need to find the word ( string) net. the problem is that one time it can be net01 or net56 or any other combination of the word net with any number between 0 to 1000000.
I need is to use awk to:
1. find the field number in which the word net**** appear for every
line ( might be more than one in a row)
2. insert an empty line after every line that contain net**
3. in the empty line I need to add the next string :
R_par(net** gnd) res r=1
note: if the word net** appears twice in a line, I need to add two
empty lines and each one to add the apropiate string.
the main problem is how to retrive the field number in which the word net** appear.
thanks for your help!
meny