开发者

from string to integer (scripts)

I have this snippet of the code:

 set calls = `cut -d" " -f2 ${2} | grep -c "$numbers"`
 set messages = `cut -d" " -f2 ${3} | grep -c "$numbers"`

 @ popularity 开发者_C百科= (calls * 3) + messages

and error

@ expression syntax

what does it mean? grep -c returns number, am I wrong, thanks in advance

in $numbers I have list of numbers, 2 and 3 parameters also contain numbers


Try

@ popularity = ($calls * 3) + $messages

The $ symbols are still needed to indicate variables.

See C-shell Cookbook

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜