Что означает оператор `-gt` в сценариях оболочки? [дубликат]

redfusion-team

Прежде всего, я хочу, чтобы вы apt-get installpostgresql

затем apt-get install libpgsql-ruby

затем apt-get install libpq- dev

, затем выполните apt-get install postgresql-server-dev-all

и, наконец, gem install pg -v 0.19.0

ЕСЛИ вы пытаетесь установить metasploit, обязательно запустите это тоже после того, как вы закончите вышеупомянутое

rvm use 2.3
bundle install

сообщите нам, сработало ли это для вас? Мы заботимся о ваших проблемах, а также, если вам когда-нибудь понадобится что-то еще, не стесняйтесь спросить

7
29.05.2018, 19:39
2 ответа
$ help test
test: test [expr]
    Evaluate conditional expression.
...
      arg1 OP arg2   Arithmetic tests.  OP is one of -eq, -ne,
                     -lt, -le, -gt, or -ge.

    Arithmetic binary operators return true if ARG1 is equal, not-equal,
    less-than, less-than-or-equal, greater-than, or greater-than-or-equal
    than ARG2.
13
27.01.2020, 20:13

Puede comenzar con help test, que mostrará la ayuda del subconjunto POSIX de la sintaxis admitida por el operador [[.

Hay una documentación completa en la sección CONDITIONAL EXPRESSIONSde man bash.

Específicamente:

Other operators:
 ...
  arg1 OP arg2   Arithmetic tests.  OP is one of -eq, -ne,
                 -lt, -le, -gt, or -ge.

Arithmetic binary operators return true if ARG1 is equal, not-equal,
less-than, less-than-or-equal, greater-than, or greater-than-or-equal
than ARG2.
3
27.01.2020, 20:13

Теги

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