added comments about [[ ]] to ash and hush. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2009-06-10 14:09:48 +02:00
parent 9ca656b149
commit 77539190ab
2 changed files with 10 additions and 0 deletions

View File

@ -8736,6 +8736,11 @@ static int ulimitcmd(int, char **) FAST_FUNC;
* Additional operators:
* || and && should work as -o and -a
* =~ regexp match
* == should do _pattern match_ against right side. bash does this:
* # [[ *a* == bab ]] && echo YES
* # [[ bab == *a* ]] && echo YES
* YES
* != does the negated == (i.e., also with pattern matching)
* Apart from the above, [[ expr ]] should work as [ expr ]
*/

View File

@ -318,6 +318,11 @@ struct command {
// Additional operators:
// || and && should work as -o and -a
// =~ regexp match
// == should do _pattern match_ against right side. bash does this:
// # [[ *a* == bab ]] && echo YES
// # [[ bab == *a* ]] && echo YES
// YES
// != does the negated == (i.e., also with pattern matching)
// Apart from the above, [[ expr ]] should work as [ expr ]
/* used for "export noglob=* glob* a=`echo a b`" */