Hi,
I have read similar questions and I was not able to get a solution, so please help
I have two files:
1-Pattern file contains list of patterns
pattern1
pattern2
pattern3
pattern4
....
pattern#
2-input file in the format
>hdhfshsdfjhpattern1xmbxmbxnmv
bzxnxnbnccm,nvbnmvbnvvn,v,v,v
ncxnmvbnmvbnvvnnv
>vnbnmcbvn,mx,fmf,mnxvm,nv,mnv
nxnvnv,mcn,vn,
>pattern3mmdlskfjkd
nxmnxm,nvmnv
I am trying to remove the line with matching pattern plus the following lines. I have this solution, that will delete the pattern and next line but not the whole record
for keyword in `cat pattern.txt`; do sed -i -e '/'$keyword'./N/d' input.txt; done
Thanks,