Converting svg to dxf from terminal requires inkscape and pstoedit. I myself am using svgo to cleanup the svg file, haven't tested if it makes difference in some edge cases.
Source code viewer
svgo example.svg inkscape -o example.eps example.svg pstoedit -dt -f 'dxf:-polyaslines -mm' example.eps example.dxfProgramming Language: Bash