conditional

 

Get help on Linux conditional Command.

 

   Linux conditional command ( [ ) is use to evaluate conditional expression or execute conditional command on Linux system.  The Linux conditional command is one of bash shell built in command.  The command example below show how to get conditional command manual or help on Linux conditional command using shell command, this help show information on how to use the Linux conditional command, the conditional command options and the arguments that can be use with Linux conditional command.

 

Get Linux conditional command help [

 

  Execute help command and the name of Linux command that we want the help file, the example below we execute help command with -m option to get the help for conditional command using the manpage format.

Linux conditional command

[linux@fedora11 ~]$ help -m [

NAME

    [ - Evaluate conditional expression.

 

SYNOPSIS

    [ arg... ]

 

DESCRIPTION

    Evaluate conditional expression.

 

    This is a synonym for the "test" builtin, but the last argument must

    be a literal `]', to match the opening `['.

 

SEE ALSO

    bash(1)

 

IMPLEMENTATION

    GNU bash, version 4.0.16(1)-release (i386-redhat-linux-gnu)

    Copyright (C) 2009 Free Software Foundation, Inc.

    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

 

NAME

    [[ ... ]] - Execute conditional command.

 

SYNOPSIS

    [[ expression ]]

 

DESCRIPTION

    Execute conditional command.

 

    Returns a status of 0 or 1 depending on the evaluation of the conditional

    expression EXPRESSION.  Expressions are composed of the same primaries used

    by the `test' builtin, and may be combined using the following operators:

 

      ( EXPRESSION )    Returns the value of EXPRESSION

      ! EXPRESSION              True if EXPRESSION is false; else false

      EXPR1 && EXPR2    True if both EXPR1 and EXPR2 are true; else false

      EXPR1 || EXPR2    True if either EXPR1 or EXPR2 is true; else false

 

    When the `==' and `!=' operators are used, the string to the right of

    the operator is used as a pattern and pattern matching is performed.

    When the `=~' operator is used, the string to the right of the operator

    is matched as a regular expression.

 

    The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to

    determine the expression's value.

 

    Exit Status:

    0 or 1 depending on value of EXPRESSION.

 

SEE ALSO

    bash(1)

 

IMPLEMENTATION

    GNU bash, version 4.0.16(1)-release (i386-redhat-linux-gnu)

    Copyright (C) 2009 Free Software Foundation, Inc.

    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

 

[linux@fedora11 ~]$

 

Keywords: conditional, conditional command, linux conditional command, conditional linux command, linux command conditional, conditional command manual, conditional manual, conditional help, help conditional, command conditional help, help conditional command