moissinac / csvfix

Automatically exported from code.google.com/p/csvfix
MIT License
0 stars 0 forks source link

eval command problems #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Simple use of the eval command to evaluate arithmetic expressions works.
Calls to functions in the eval language don't.

Original issue reported on code.google.com by nbutterworth1953@gmail.com on 20 Sep 2009 at 8:34

GoogleCodeExporter commented 8 years ago
Not a bug, as it turns out. I had forgotten that $1, $2 etc. are shell 
variables, so
that when used in an eval expression weird stuff happens. I was doing:

csvfix eval -e "if($1,42,0)"

when I should have been doing:

csvfix eval -e 'if($1,42,0)'

Note single quotes! The manual has been updated for the next release to point 
out
this issue.

Original comment by nbutterworth1953@gmail.com on 21 Sep 2009 at 10:51