Как я могу искать файл, используя «меньше» для значения с десятичной точкой?

Мне кажется, это хорошо задокументировано на странице руководства Bash:

выдержка

   case word in [ [(] pattern [ | pattern ] ... ) list ;; ] ... esac
        A case command first expands word, and tries to match it against 
        each pattern in turn, using the same matching rules as for 
        pathname expansion  (see Pathname Expansion below).  The word is 
        expanded using tilde expansion, parameter and variable expansion, 
        arithmetic substitution, command substitution, process substitution 
        and quote removal.  Each pattern examined is expanded  using  tilde  
        expansion,  parameter  and  variable  expansion,  arithmetic  
        substitution, command substitution, and process substitution.  If 
        the shell option nocasematch is enabled, the match is performed 
        without regard to the case of alphabetic characters.  When a match  
        is  found, the  corresponding list is executed.  

        If the ;; operator is used, no subsequent matches are attempted 
        after the first pattern match. Using ;& in place of ;; causes 
        execution to continue with the list associated with the next set of 
        patterns.  Using ;;& in place  of ;;  causes  the shell to test the 
        next pattern list in the statement, if any, and execute any 
        associated list on a successful match. The exit status is zero if no 
        pattern matches.  Otherwise, it is the exit status of the last 
        command executed in list.

Это не сработает, потому что нотация ;; находится вне блока case ... esac.

 esac
 ;; 
 print "why here?"

Также в вашем примере показана оболочка Korn ( ksh ), но обозначения совпадают с тем, что я знаю о ksh . Это также показано здесь:

Ссылки

5
15.01.2019, 19:37
0 ответов

Теги

Похожие вопросы