powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Unix-системы [игнор отключен] [закрыт для гостей] / gtar и find
7 сообщений из 7, страница 1 из 1
gtar и find
    #38156874
gtar find
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
скажите бога ради. почему вот это не работатет

gtar czvf 2013-02-19.tgz --remove 'find /u200/archive10 -type f -name *.dbf'|tee 2013-02-19.log


10:11 oracle p00$ gtar czvf 2013-02-19.tgz --remove 'find /u200/archive10 -type f -name *.dbf'|tee 2013-02-19.log
gtar: find /u200/archive10 -type f -name *.dbf: Cannot stat: A file or directory in the path name does not exist.
gtar: Error exit delayed from previous errors



в то время как вот это работает
find /u200/archive10 -type f -name *.dbf
...
Рейтинг: 0 / 0
gtar и find
    #38156902
Пухлый
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
gtar find,

Кавычки не не стоят. Надо `find /u200/archive10 -type f -name *.dbf`
...
Рейтинг: 0 / 0
gtar и find
    #38157217
gtar find
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
`f а это не кавычка? а что это?
...
Рейтинг: 0 / 0
gtar и find
    #38157557
vkle
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Кавычки бывают разные. И назначение у них разное.
...
Рейтинг: 0 / 0
gtar и find
    #38157714
gtar find
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
простите что я так дотошно. но это где?
и спасибо заранее
...
Рейтинг: 0 / 0
gtar и find
    #38157889
vkle
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Да в общем то, в любом ЯП есть спецификация, где рассказано, какие символы для чего нужны. Командные интерпретаторы оболочек - не исключение. Одинарная и двойная кавычки обычно применяются для определения строки. Обратные кавычки - для выполнения команды во внешней оболочке и возврата результата в текущий скрипт.
...
Рейтинг: 0 / 0
gtar и find
    #38158083
Пухлый
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
gtar find,

Это, например, "man bash":

Код: html
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
Command Substitution
       Command  substitution  allows the output of a command to replace the command name.  There are two
       forms:

              $(command)
       or
              ‘command‘

       Bash performs the expansion by executing command and replacing the command substitution with  the
       standard  output  of  the command, with any trailing newlines deleted.  Embedded newlines are not
       deleted, but they may be removed during word splitting.  The command substitution $(cat file) can
       be replaced by the equivalent but faster $(< file).

       When  the old-style backquote form of substitution is used, backslash retains its literal meaning
       except when followed by $, ‘, or \.  The first backquote not preceded by a  backslash  terminates
       the command substitution.  When using the $(command) form, all characters between the parentheses
       make up the command; none are treated specially.

       Command substitutions may be nested.  To nest when using the backquoted form,  escape  the  inner
       backquotes with backslashes.

       If  the  substitution appears within double quotes, word splitting and pathname expansion are not
       performed on the results.
...
Рейтинг: 0 / 0
7 сообщений из 7, страница 1 из 1
Форумы / Unix-системы [игнор отключен] [закрыт для гостей] / gtar и find
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]