Checkout the github repository
https://github.com/jeroenjanssens/data-science-at-the-command-line
and use the csv2arff tool.
Example:
< /home/knut/R/x86_64-pc-linux-gnu-library/3.1/knitr/misc/tweak_bib.csv
csv2arff
> tweak_bib.csv.arff
csv2arff is a very simple bash script. I recommend to check out the repository because you should also use csv2arff in conjunction with the loading script data-science-at-the-command-line/tools/weka supplied with this book/repo. The script then loads weka.jar.
Last time I checked, the csv2arff, or rather the class core.converters.CSVLoader did not work properly with weka 3.7.
....
just checking
....
OK. It works with weka 3.8.
You should set an environment variable WEKAPATH to the directory which contains your weka.jar.