0

Im using a script on a mac bash shell that uses gnuplot.

When I use

using 1:($2*100.0)

on the script, I get

using 1: (*100.0)
 line 0: invalid expression

However, if I use the same command on the gnuplot prompt line I have no problems.

Is there a different format for the using command when using it on a script?

Thanks for your time.

4

1 回答 1

2

由于您尚未发布脚本,因此我只能猜测。

问题可能来自 bash 将 $2 解释为“脚本的第二个参数”这一事实。您应该使用反斜杠转义美元符号。

using 1:(\$2*100.0)
于 2013-03-21T00:44:12.973 回答