Consider the below set of lines in a file:
File1.csv
Apple is red WHERE the column ALP_ACCT_PROD_ID, it can be plucked
Apple is red ON ALP_ACCT_PROD_ID , WHERE it can be plucked
I want to look after if ALP_ACCT_PROD_ID occurs only after the word WHERE then only it should print it.
So for the above File it should print only the Line - Apple is red where the column ALP_ACCT_PROD_ID, it can be plucked
and ignore the second as ALP_ACCT_PROD_ID is not after WHERE.
Please help with the solution I am trying to do a normal grep and with that I am getting both the lines
grep ALP_ACCT_PROD_ID