I'm working on this shell script to process the each output from grep by searching each regexp from file1 and using each matching regexp and searching file2 for a matching line and using awk to delete
Code:
#Here is my code
#!bin/sh
regexp="[a-z]*.[a-z][,$]+"
file1=$1
file2=$2
#this searches all matching regexp in file1
grep -i -o -E "$regexp" $file1 #how to assign each output to$str was thinking of arrays,here but it'll be long
#Problems is using each output from grep lets say $str
#next part searching file 2 for $str and deleting each matching line
line=$(grep -o -i "$str" $file2)
#delete line
sed '/$line/d' $file2