Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • What do you want, the output code of the command or what it returns? Commented Oct 7, 2014 at 15:49
  • 2
    If it works without the brackets (using the exit status), then there is no need to run in with the test command. Commented Oct 7, 2014 at 16:04
  • Why do you want to use it inside test? Are you trying to test whether it emits output, rather than its exit status? Commented Oct 7, 2014 at 17:52
  • I am trying to understand how test works. Commented Oct 8, 2014 at 6:14