Answer by steeldriver for How to use grep to get the matching part only,...
If you don't mind using perl:mycommand | perl -lne 'print join "", /ban[a-z]*/g'The matches on each line are returned in a list context, which you can join with an empty delimiter.
View ArticleHow to use grep to get the matching part only, without introducing extra...
I have a output from a command that I want to pipe to some kind of grep command to obtain the part in each line that matches a given regex, and only output the matching part, without introducing...
View Article
More Pages to Explore .....