# Command resource

**URL:** <https://discourse.chef.io/t/command-resource/12747>\
**Category:** Chef InSpec\
**Created:** [March 8, 2018, 5:50pm UTC](https://discourse.chef.io/t/command-resource/12747 "2018-03-08T17:50:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![poornimas](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@poornimas](https://discourse.chef.io/u/poornimas)\
**Post date:** [March 8, 2018, 5:50pm UTC](https://discourse.chef.io/t/command-resource/12747/1 "2018-03-08T17:50:03Z")

</div>

The command resource displays the full output of a command. How can it be suppressed?

---

<div class="post-metadata">

**Author:** ![simark](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/simark/32/2099_2.png) [@simark](https://discourse.chef.io/u/simark)\
**Post date:** [March 28, 2018, 10:14am UTC](https://discourse.chef.io/t/command-resource/12747/2 "2018-03-28T10:14:26Z")

</div>

Write a command a that filters the output for you

```ruby
describe command('your_command | grep -o your_filter') do
  its('stdout') { should eq "your_filter" }
  its('stderr') { should eq '' }
  its('exit_status') { should eq 0 }
end

```
