On 16.04.04 Jonas Witt (wittj@gmx.net) wrote:
Am Fri, 16 Apr 2004 19:47:47 +0200 schrieb Erik Schanze
Falk Döring:
Hi *,
[[ -f ~/.alias ]] && [[ -z $LOAD_SYSTEM_ALIASES ]] && return 0 [[ -n $IGNORE_SYSTEM_ALIASES ]] && return 0
Wieso doppelte "["?
Nach 'man bash':
"[[ expression ]] Return a status of 0 or 1 depending on the evaluation of the conditional expression expression. Expressions are composed of the primaries described below under CONDITIONAL EXPRESSIONS. Word splitting and pathname expansion are not performed on the words between the [[ and ]]; tilde expansion, parameter and variable expansion, arithmetic expansion, command substitution, process substitution, and quote removal are performed.
[...]"
[[ expression ]] tut dasselbe wie 'test expression'.
bash(1)
test expr [ expr ] Return a status of 0 or 1 depending on the evalua tion of the conditional expression expr. Each operator and operand must be a separate argument. Expressions are composed of the primaries described above under CONDITIONAL EXPRESSIONS.
CONDITIONAL EXPRESSIONS Conditional expressions are used by the [[ compound com mand and the test and [ builtin commands to test file attributes and perform string and arithmetic comparisons.
wobei mir nicht ganz klar ist, was ein compound command ist.
H.