I have one file which contains several lines of data
editPin -pin phy_inst/i_dfi_row_cmd_p1_d[0] ctrl_soft_phy_inst/hbm_ch_tile_4_hbm_tile_inst/o_phy_row_cmd_p1[0] -assign {1443.0305 184.62} -layer M10 -pinWidth 0.038 -pinDepth 0.395 -fixOverlap false -fixedPin -snap MGRID
editPin -pin phy_inst/i_dfi_row_cmd_p1_d[1] ctrl_soft_phy_inst/hbm_ch_tile_4_hbm_tile_inst/o_phy_row_cmd_p1[0] -assign {1444.0305 185.62} -layer M10 -pinWidth 0.038 -pinDepth 0.395 -fixOverlap false -fixedPin -snap MGRID
and i want to perform some operation and i want to set my line like this
eval editPin -pin i_dfi_row_cmd_p1_d[0] -assign { 0 [ expr 1443.0305 184.62]} -layer M10 -pinWidth 0.038 -pinDepth 0.395 -fixOverlap false -fixedPin -snap MGRID
eval editPin -pin i_dfi_row_cmd_p1_d[1] -assign { 0 [ expr 1444.0305 185.62]} -layer M10 -pinWidth 0.038 -pinDepth 0.395 -fixOverlap false -fixedPin -snap MGRID
I used these commands individually, I tried them, and it worked how I wanted the structure.
awk '{$4=""; print $0}' all_pin
awk '{print "eval " $0}' all_pin
sed -e /^editPin/'{ s#phy_inst/## ; s/{/{ 0 [ expr / ; s/}/]}/ ; }' all_pin
but when i used these commands together its not giving the result how i want
cat all_pin | awk '{$4=""; print $0}' all_pin | awk '{print "eval " $0}' all_pin | sed -e /^editPin/'{ s#phy_inst/## ; s/{/{ 0 [ expr / ; s/}/]}/ ; }' all_pin
may i know the solution for this
and i want to perform addition operation for this block
-assign { 0 [ expr 1443.0305 362.764+X]}
X is a constant value and i want to add X to 362.764 using command.I tried but I got the wrong answer
awk '{print $10+100}' all_pin
please help me to get out of this
-assign { 0 [ expr 1443.0305 184.62 ]}instead of-assign { 0 [ expr 1443.0305 184.62]}? (There's an extra space between the second fractional number and the closing[}.)