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*

7
  • Since [ / test is a bash built-in, it's better to use help test, not man test. Commented Jan 15, 2017 at 3:32
  • @Patrick true, although it depends on the OS person uses. It might not have any documentation at all. See this post from a few days ago : unix.stackexchange.com/q/336521/85039 Commented Jan 15, 2017 at 3:34
  • Actually it doesn't depend on the OS. The builtin [ and test commands will always take precedence over the OS ones. Commented Jan 15, 2017 at 3:35
  • @Patrick What I mean is presence of documentation for standard test command depends on the OS. Commented Jan 15, 2017 at 3:38
  • @Patrick by the way, this slightly overdue of a comment ( I'm not the fastest guy on U&L ) , but bash isn't the only shell that uses test, so I'm not sure if it's OK to make assumptions for what's OP is using. Commented Jan 15, 2017 at 5:06