Интерпретация! 12 как строка, а не как история терминала

Используя примерную команду ниже в curl, она не работает должным образом:

curl -ik "http://localhost/index.php?username=parto&password=hello!23"

Я ожидаю, что параметры будут переданы для включения:

username = parto
password = hello!23

Но часть !23 в пароле интерпретируется как обозначение события истории. Если 23-я команда sudo apt-get update, команды становятся:

curl -ik "http://localhost/index.php?username=parto&password=hellosudo apt-get update"
Обозначения событий Обозначение события - это ссылка на запись в командной строке в списке истории. Если ссылка не является абсолютной, события относятся к текущей позиции в списке истории.
   >!      Start a history substitution, except when followed by a blank,
          newline, = or (.
   !n     Refer to command line n.
   !-n    Refer to the current command minus n.
   !!     Refer to the previous command.  This is a synonym for `!-1'.
   !string
          Refer to the most recent command preceding the current
          position in the history list starting with string.
   !?string[?]
          Refer to the most recent command preceding the current
          position in the history list containing string.  The trailing
          ? may be omitted if string is followed immediately by a
          newline.
   ^string1^string2^
          Quick substitution.  Repeat the last command, replacing
          string1 with string2.  Equivalent to ``!!:s/string1/string2/''
          (see Modifiers below).
   !#     The entire command line typed so far.

Не используя лишние символы, как показано на странице руководства (как указано выше), как мы можем «сообщить» терминалу НЕ интерпретировать приведенную выше команду (! 23) как обозначение события?

1
задан 5 February 2016 в 18:08

0 ответов

Другие вопросы по тегам:

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