Is there any tool or script available?
To generate output into a file follow these steps:
$ sqlite3 mytable.db sqlite> .output output.sql sqlite> .dump table_name sqlite> .quit