On Thu, 02 Oct 2014 20:39:01 +0300
ellanios82
Hello List,
- in case of interest : see a file in /usr/bin named " [ " :
-rwxr-xr-x 1 root root 39704 Sep 28 21:42 [
.......................
- is this orthodox ?
Originally, the Bourne shell "if" was of the form if command ; then ... fi The shell would run the command and see if it succeeded (gave a return value of 0). You can still use "if" that way, though it is often considered bad form. If you would instead like to have: if [ expression ] ; then ... fi then the obvious way to do that is to have a command named "[" whose job is to evaluate its arguments (excluding a final "]") as a logical expression and to succeed (return 0) if the expression is true. That's how the command "[" got started. And it is still there for backward compatibility (if you have a really really old version of Bourne shell). -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org