I have a file which contains below data
7[label = "ScanStep: T_b0\n(T.a = 1)\na\nb\nc\nd\ne\ndob\ntimestamp1\nUnc: Integer(8)\nUnc: Integer(8)\nUnc: Varchar(80)\nUnc: Numeric(10,2)\nUnc: Varbinary(80)\nUnc: Date(8)\nUnc: Timestamp(8)", color = "brown", shape = "box"];
7[label = "ScanStep: cde_b1\nBuddies: (cde_b1, cde_b0, cde_b2)\n(public.cde.newcol = \'013\')\nssn\nnewcol\nmasked_ssn\nUnc: Numeric(10,2)\nUnc: Varbinary(80)\nUnc: Date(8)\nUnc: Timestamp(8)", color = "brown", shape = "box"];
there are multiple such entries.
I need to print only those entries which comes after "\n(" and before ")\n".
I have tried with awk but unable to provide delimiter.
awk -F "\\n\\\\(" '{print $1}' unset
prints whole line of the file
awk -F "\\n\\(" '{print $1}' unset
prints awk: warning: escape sequence
\(' treated as plain
(' awk: fatal: Unmatched ( or (: / (/
grep -Po '(?<=\\n\().*?(?=\)\\n)'
– steeldriver Jun 23 '16 at 12:04