Issue
I have a file with data in below format
abc {u_bit_top/connect_down/u_FDIO[6]/u_latch}
ghi {u_bit_top/seq_connect/p_REDEIO[9]/ff_latch
def {u_bit_top/connect_up/shift_reg[7]
I want to search for pattern *bit_top*FDIO*
and *bit_top*REDEIO*
in the file in each line and delete the complete line if pattern is found.
I want output as
def {u_bit_top/connect_up/shift_reg[7]
I did using sed like sed "/bit_top/d;/FDIO/d;/REDEIO/d;"
but this deletes the line having bit_top and FDIO and REDEIO separately.
How I can search for above pattern and delete the line containing it.
Shell or TCL anything will be useful.
Solution
You've been close! ;)
sed '/bit_top.*FDIO/d' input
Just input a regex to sed that matches what you want...
Answered By - boppy Answer Checked By - Katrina (WPSolving Volunteer)