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