имеется:
--> cat upup.sh
if [ ( pgrep chromium 1>/dev/null ) ]
then
echo 'open'
else
echo 'close'
fi
--> ./upup.sh
./upup.sh: строка 1: синтаксическая ошибка рядом с неожиданным маркером «pgrep»
./upup.sh: строка 1: `if [ ( pgrep chromium 1>/dev/null ) ] '
в мане сказано:
SYNOPSIS
test EXPRESSION
test
[ EXPRESSION ]
[ ]
[ OPTION
DESCRIPTION
Exit with the status determined by EXPRESSION.
--help
display this help and exit
--version
output version information and exit
An omitted EXPRESSION defaults to false. Otherwise, EXPRESSION is true or false and sets exit status. It is one of:
( EXPRESSION )
EXPRESSION is true
мануал или баш сутулится???