Output from a command


I have a need to put output of a command in the report section.

Is there an example for doing this?

In the report below I want the output of nmap to show up.

The Chef Compliance server is on a linux machine.
The control script:
control ‘nmap-1’ do
impact 10.0
title 'Scanning the Host’
describe command(‘nmap localhost’) do
its( “stdout” ) { should match(/^22.*/) }

I need the output of nmap to show up in report section.