Florian Lehmann wrote: > I recently recognised a missfunktion in coreutil test. When calling test > with option --help, test does not print anything and returns with > exit-code 0.
Thanks for your report. But what you are seeing is not a bug in test but is instead simply a misunderstanding of how it is used. The 'test' behavior has been around for decades and the use is standardized upon previously existing behavior. Two points are of interest about your test --help question. One is that unless you are careful you are getting the shell builtin test and not the external standalone test program. $ type test test is a shell builtin Two and the main point of your issue is that test is required to evaluate the expression very specifically based upon the total number of arguments. Since your case "test --help" provides only one argument then test is required to "Exit true (0) if $1 is not null; otherwise, exit false." Since "--help" is not null then test will exit true (0) for that expression. See the standards page for more information. http://www.opengroup.org/onlinepubs/009695399/utilities/test.html Bob