Quantcast
Channel: Print multiple search pattern in one line + text manipulation - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 3

Print multiple search pattern in one line + text manipulation

$
0
0

My output looks like this:

 /map1/firmware1   Targets   Properties
     version=2.44
     date=Jul 19 2016
     name=iLO 4

My desired output is:

version=2.44 date=Jul_19_2016

To merge the output into one line I tried to use xargs. But then he only prints date.

cat test | egrep '(version=|date=)' |xargs
 date=Jul 19 2016

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images