* [Comm] expr - синтаксическая ошибка
@ 2014-07-14 0:01 Speccyfighter
2014-07-14 0:37 ` Speccyfighter
0 siblings, 1 reply; 4+ messages in thread
From: Speccyfighter @ 2014-07-14 0:01 UTC (permalink / raw)
To: ALT Linux Community general discussions
Сабж собсно.
Система на репозитории t7
$ expr --help|head -25|tail -1
АРГ1 * АРГ2 арифметическое произведение АРГ1 и АРГ2
$ LC_ALL=C expr 4 * 4
expr: syntax error
$ info coreutils 'expr invocation'
* Numeric expressions:: + - * / %
$ rpm -qf $(which expr)
coreutils-8.21-alt1
Не фурычит.
На что вешать, на Сизиф?
--
Лучшее - враг хорошего!
(Спектрумовский фольклор)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] expr - синтаксическая ошибка
2014-07-14 0:01 [Comm] expr - синтаксическая ошибка Speccyfighter
@ 2014-07-14 0:37 ` Speccyfighter
2014-07-14 4:55 ` Andrew Borodin
0 siblings, 1 reply; 4+ messages in thread
From: Speccyfighter @ 2014-07-14 0:37 UTC (permalink / raw)
To: ALT Linux Community general discussions
14.07.2014, 04:01, "Speccyfighter" <zxwarior@yandex.ru>:
> Сабж собсно.
>
> Система на репозитории t7
>
> $ expr --help|head -25|tail -1
> АРГ1 * АРГ2 арифметическое произведение АРГ1 и АРГ2
>
> $ LC_ALL=C expr 4 * 4
> expr: syntax error
>
> $ info coreutils 'expr invocation'
> * Numeric expressions:: + - * / %
>
> $ rpm -qf $(which expr)
> coreutils-8.21-alt1
>
> Не фурычит.
> На что вешать, на Сизиф?
>
Упс...
$ expr 4 * 4
expr: синтаксическая ошибка
$ expr 4 \* 4
16
Beware that many operators need to be escaped or quoted for shells.
Но почему конкретно об этой операции не упоминается,
нигде, явно, что она требует экранирования, непонятно.
Какое-то расплывчатое: некоторые, может быть, наверное.
Что винить? Man с хелповником или операцию?
--
Лучшее - враг хорошего!
(Спектрумовский фольклор)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] expr - синтаксическая ошибка
2014-07-14 0:37 ` Speccyfighter
@ 2014-07-14 4:55 ` Andrew Borodin
2014-07-14 11:09 ` Speccyfighter
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Borodin @ 2014-07-14 4:55 UTC (permalink / raw)
To: ALT Linux Community general discussions
On Mon, Jul 14, 2014 at 04:37:24AM +0400, Speccyfighter wrote:
> $ expr 4 * 4
> expr: синтаксическая ошибка
> $ expr 4 \* 4
> 16
> Beware that many operators need to be escaped or quoted for shells.
> Но почему конкретно об этой операции не упоминается,
> нигде, явно, что она требует экранирования, непонятно.
Потому что без экранирования -- это wildcard, раскрываемый
шеллом.
> Какое-то расплывчатое: некоторые, может быть, наверное.
> Что винить? Man с хелповником или операцию?
Никого не винить. Это особенность работы шелла.
--
С уважением
А. Бородин.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] expr - синтаксическая ошибка
2014-07-14 4:55 ` Andrew Borodin
@ 2014-07-14 11:09 ` Speccyfighter
0 siblings, 0 replies; 4+ messages in thread
From: Speccyfighter @ 2014-07-14 11:09 UTC (permalink / raw)
To: ALT Linux Community general discussions
14.07.2014, 08:55, "Andrew Borodin" <borodin@zarya-k.ru>:
> On Mon, Jul 14, 2014 at 04:37:24AM +0400, Speccyfighter wrote:
>> $ expr 4 * 4
>> expr: синтаксическая ошибка
>> $ expr 4 \* 4
>> 16
>> Beware that many operators need to be escaped or quoted for shells.
>> Но почему конкретно об этой операции не упоминается,
>> нигде, явно, что она требует экранирования, непонятно.
>
> Потому что без экранирования -- это wildcard, раскрываемый
> шеллом.
>> Какое-то расплывчатое: некоторые, может быть, наверное.
>> Что винить? Man с хелповником или операцию?
>
> Никого не винить. Это особенность работы шелла.
>
Ага, понятно. Спасибо.
--
Лучшее - враг хорошего!
(Спектрумовский фольклор)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-14 11:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-14 0:01 [Comm] expr - синтаксическая ошибка Speccyfighter
2014-07-14 0:37 ` Speccyfighter
2014-07-14 4:55 ` Andrew Borodin
2014-07-14 11:09 ` Speccyfighter
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git