1

Merge output of 2 commands into variable

view story
linux-howto

http://www.unix.com – I am extracting two pieces of information from the following file: /proc/cpuinfo, that I need to merge into one report. The first command: grep -i processor /proc/cpuinfo | awk '{print $1$2,$3}' yields: processor: 0 processor: 1 processor: 2 processor: 3 The second command: grep -i "model name" /proc/cpuinfo | awk '{print $4, $5, $6, $7, " ", $8, $9, $10, $11}' yields: Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz I want a report that looks like t (HowTos)