How to print the content between two brackets.
For example:
return [ "server1.domain.com" ,
"server2.domain.com" ,
"server3.domain.com" ]
Expected result:
"server1.domain.com" ,
"server2.domain.com" ,
"server3.domain.com"
How to get the expected result?
pcregrep
is one of manygrep
implementations. Some othergrep
implementations like some versions of GNUgrep
will also work there if you replace thepcregrep -Mo
withgrep -zPo
and pipe the output totr '\0' '\n'
– Stéphane Chazelas Sep 14 '16 at 12:56