Использовать экран. Это прекрасно, когда вам нужно несколько терминалов. Специально, когда вы подключены через ssh, и вы не хотите запускать другой сеанс.
Вы можете, например, запустить в нем команду, отсоединить, перейти на другую машину, снова подключиться и все еще там.
Другим аналогичным приложением, которое обеспечивает то же самое, является [d1 ] экран .
Параметр -w делает grep look for words, поэтому он будет показывать crk, если он окружен символами, отличными от слова. Из man grep:
-w, --word-regexp Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore._ является символом слова, поэтому crk_op не будет соответствовать crk с -w.
Скрученное регулярное выражение "[^ ]*crk[^ ]*" ] работает, потому что он позволяет любое количество непространственных символов между границами слов, которые требуется grep.
Просто выполните:
grep -rn --include '*.c' . -e crk
Вам не нужно qoute . для текущего каталога.
Параметр -w делает grep look for words, поэтому он будет показывать crk, если он окружен символами, отличными от слова. Из man grep:
-w, --word-regexp Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore._ является символом слова, поэтому crk_op не будет соответствовать crk с -w.
Скрученное регулярное выражение "[^ ]*crk[^ ]*" ] работает, потому что он позволяет любое количество непространственных символов между границами слов, которые требуется grep.
Просто выполните:
grep -rn --include '*.c' . -e crk
Вам не нужно qoute . для текущего каталога.
Параметр -w делает grep look for words, поэтому он будет показывать crk, если он окружен символами, отличными от слова. Из man grep:
-w, --word-regexp Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore._ является символом слова, поэтому crk_op не будет соответствовать crk с -w.
Скрученное регулярное выражение "[^ ]*crk[^ ]*" ] работает, потому что он позволяет любое количество непространственных символов между границами слов, которые требуется grep.
Просто выполните:
grep -rn --include '*.c' . -e crk
Вам не нужно qoute . для текущего каталога.
Параметр -w делает grep look for words, поэтому он будет показывать crk, если он окружен символами, отличными от слова. Из man grep:
-w, --word-regexp Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore._ является символом слова, поэтому crk_op не будет соответствовать crk с -w.
Скрученное регулярное выражение "[^ ]*crk[^ ]*" ] работает, потому что он позволяет любое количество непространственных символов между границами слов, которые требуется grep.
Просто выполните:
grep -rn --include '*.c' . -e crk
Вам не нужно qoute . для текущего каталога.
Параметр -w делает grep look for words, поэтому он будет показывать crk, если он окружен символами, отличными от слова. Из man grep:
-w, --word-regexp Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore._ является символом слова, поэтому crk_op не будет соответствовать crk с -w.
Скрученное регулярное выражение "[^ ]*crk[^ ]*" ] работает, потому что он позволяет любое количество непространственных символов между границами слов, которые требуется grep.
Просто выполните:
grep -rn --include '*.c' . -e crk
Вам не нужно qoute . для текущего каталога.