Hi I want to grep variable pattern which is in first column. $ cat test.txt    abc.xyz   abc.defpqr.tappqr.abcabc.mnpmnp.abcabc.pqrabc.mobIf variable pattern is abc then output should beabc.xyzabc.defabc.mnpabc.pqrabc.mobIf variable pattern is mnp then output should bemnp.abcIf pattern is not variable then I can do by command (For pattern mnp)awk -F. '{ if($1 == mnp) print $0;}' test.txtPlease guide me for the variable pattern.
How to grep variable pattern which is in first column
linux;awk;grep