I have a text file on a Linux machine and I want to run 3 sed commands for the lines entered by the user using a perl script. I am doing this manually till now.
The sed commands I have to use are :
sed -i "s/{+//" error.txt sed -i "s/+}//" error.txt sed -i "s/\[-.*-]//g" error.txt error.txt is the file where I want to run these commands, but I want them to run on a particular line which I will enter.
Error.txt:
1:module counter ( clk, reset, enable, {+dat_out+} ); 4: input clk, [-reset ;-] {+reset, enable;+} 5: wire {+N69, N70, N71,+} N72, N73, N74, N75, N76, N77, N78, N79, N80, 10: EDFFX2AD \dat_out_sig_reg[0] ( [-.D(synopsis_unconnected),-] {+.D(N69),+} .E(N96), .CK(clk), .Q(dat_out[0]) 12: EDFFX2AD \dat_out_sig_reg[1] ( {+.D(N70),+} .E(N94), .CK(clk), .Q(dat_out[1]) 14: EDFFX2AD \dat_out_sig_reg[2] ( .D(N71), [-.E(synopsis_unconnected),-] {+.E(N92),+} .CK(clk), .Q(dat_out[2]) expected output:
1:module counter ( clk, reset, enable, dat_out ); 4: input clk, [-reset ;-] {+reset, enable;+} 5: wire {+N69, N70, N71,+} N72, N73, N74, N75, N76, N77, N78, N79, N80, 10: EDFFX2AD \dat_out_sig_reg[0] ( .D(N69), .E(N96), .CK(clk), .Q(dat_out[0]) 12: EDFFX2AD \dat_out_sig_reg[1] ( {+.D(N70),+} .E(N94), .CK(clk), .Q(dat_out[1]) 14: EDFFX2AD \dat_out_sig_reg[2] ( .D(N71), [-.E(synopsis_unconnected),-] {+.E(N92),+} .CK(clk), .Q(dat_out[2]) The codes are applied on Line 1 and Line 10. Please suggest something
wdiffoutput. What is the overall issue you are solving?