[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: None

From: Bob Proulx
Subject: Re: None
Date: Sun, 18 May 2003 12:15:50 -0600
User-agent: Mutt/1.3.28i

Thanks for the report.  But first, please put a meaning subject line
on your messages when you send them.  It increases the readability and
with it the likelyhood that you message will be read and responded to.

cmUs wrote:
> bash> expr 8 * 2
> expr: symtan error
> bash> expr ( 8 * 2 ) 
> bash: syntax error near unexpected token '8'

You are forgetting that the shell is expanding shell metacharacters
prior to handing the the args to the command.

Try this.  What do you see?  If you were the command 'expr' would that
make sense to you?

  echo expr 8 * 2

The correct thing to do here is to quote the shell metacharacters.

  expr 8 '*' 2


  expr '(' 8 '*' 2 ')'

Hope this helps,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]