кстати, если вы желаете использовать лексикографическое сравнение строк в текущей локали, то вы можете воспользоваться средствами самого 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 expan‐
sion, parameter and variable expansion, arithmetic expansion, command substitution, process substi‐
tution, and quote removal are performed. Conditional operators such as -f must be unquoted to be
recognized as primaries.
When used with [[, The < and > operators sort lexicographically using the current locale.
When the == and != operators are used, the string to the right of the operator is considered a pat‐
tern and matched according to the rules described below under Pattern Matching. If the shell
option nocasematch is enabled, the match is performed without regard to the case of alphabetic
characters. The return value is 0 if the string matches (==) or does not match (!=) the pattern,
and 1 otherwise. Any part of the pattern may be quoted to force it to be matched as a string.
An additional binary operator, =~, is available, with the same precedence as == and !=. When it is
used, the string to the right of the operator is considered an extended regular expression and
matched accordingly (as in regex(3)). The return value is 0 if the string matches the pattern, and
1 otherwise. If the regular expression is syntactically incorrect, the conditional expression's
return value is 2. If the shell option nocasematch is enabled, the match is performed without
regard to the case of alphabetic characters. Any part of the pattern may be quoted to force it to
be matched as a string. Substrings matched by parenthesized subexpressions within the regular
expression are saved in the array variable BASH_REMATCH. The element of BASH_REMATCH with index 0
is the portion of the string matching the entire regular expression. The element of BASH_REMATCH
with index n is the portion of the string matching the nth parenthesized subexpression.
Expressions may be combined using the following operators, listed in decreasing order of prece‐
dence:
( expression )
Returns the value of expression. This may be used to override the normal precedence of
operators.
! expression
True if expression is false.
expression1 && expression2
True if both expression1 and expression2 are true.
expression1 || expression2
True if either expression1 or expression2 is true.
The && and || operators do not evaluate expression2 if the value of expression1 is sufficient to
determine the return value of the entire conditional expression.
Всех известий — конец
Да, весна началась!
(всё к лицу подлецу, как родному отцу, не рассказывай, батя, и так всё пройдёт)
