man grep
ayudas:
EXIT STATUS
The grep utility exits with one of the following values:
0 One or more lines were selected.
1 No lines were selected.
>1 An error occurred.
Además, para GNU Grep:
However, if the -q or --quiet or --silent option is used and a line is
selected, the exit status is 0 even if an error occurred. Other grep
implementations may exit with status greater than 2 on error.
Y, dependiendo de la implementación:
Normally, exit status is 0 if matches were found, and 1 if
no matches were found. (The -v option inverts the sense
of the exit status.)
Para probarse a sí mismo, coloque lo siguiente en un script y ejecútelo.
#!/bin/bash
echo -n "Match: "
echo grep | grep grep >/dev/null; echo $?
echo -n "Inverted match (-v): "
echo grep | grep -v grep; echo $?
echo -n "Nonmatch: "
echo grep | grep grepx; echo $?
echo -n "Inverted nonmatch (-v): "
echo grep | grep -v grepx >/dev/null; echo $?
echo -n "Quiet match (-q): "
echo grep | grep -q grep; echo $?
echo -n "Quiet nonmatch (-q): "
echo grep | grep -q grepx; echo $?
echo -n "Inverted quiet match (-qv): "
echo grep | grep -qv grep; echo $?
echo -n "Inverted quiet nonmatch (-qv): "
echo grep | grep -qv grepx; echo $?
Первый рабочий стол имеет номер 1, поэтому
— это то, что вам нужно.
, вероятно, соответствует всем рабочим столам.
Следует также отметить, что в разделе SendToDesktop вики-страницы Openbox не упоминается какой-либо параметр <диалог>
, фактически он не упомяните любой метод, который вы могли бы использовать, чтобы предотвратить отображение экранного меню.