Subject: bug#28461: closed (Re: bug#28461: erreurs)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 14 Sep 2017 18:02:03 +0000

Your bug report

#28461: erreurs

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
28461: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28461
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#28461: erreurs
From: Assaf Gordon <[email-masked]>
To: Eric Mariaud <[email-masked]>, [email-masked]
Date: Thu, 14 Sep 2017 12:00:53 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

tag 28461 notabug
stop

Hello,

On 2017-09-14 11:43 AM, Eric Mariaud wrote:
> eric@Eric-Xub:~/Bureau$ expr 2 + 3
> 5
> eric@Eric-Xub:~/Bureau$ expr 2 * 3
> expr: erreur de syntaxe

The asterisks ( * ) character has special meaning on the shell,
which you can observe by comparing the output of:

    echo 2 + 3
vs
    echo 2 * 3

Technically, the shell replaces the '*' character with the list of
all files in the current directory. The 'expr' program never sees it.

Add single-quotes around the '*' character to send it as-is to 'expr':

    $ expr 2 '*' 3
    6

Alternatively,
Most modern shells support built-in basic arithmetic using
the '$(())' syntax (dollar-sign and two parentheses):

    $ echo $((2*3))
    6

As such, I'm marking this as not-a-bug, but discussion can continue by
replying to this thread.

regards,
 - assaf

Subject: erreurs
From: Eric Mariaud <[email-masked]>
To: [email-masked]
Date: Thu, 14 Sep 2017 19:43:03 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Bonjour

voici le résultat des commandes que me retourne mon terminal, Xubuntu 14.04

eric@Eric-Xub:~/Bureau$ expr 2 + 3
5
eric@Eric-Xub:~/Bureau$ expr 2 * 3
expr: erreur de syntaxe
eric@Eric-Xub:~/Bureau$

Cordialement