How to execute a command from a scala script? -


i want execute mysqldump -u talkexchange -p --opt talkexchange > /talkmedia/backups/database_backup.sql command scala script. how go it? thanks.

you can @0__ suggested sys.process._ little tweak:

import sys.process._ import java.io.file "mysqldump -u talkexchange -p --opt talkexchange" #> new file("/talkmedia/backups/database_backup.sql") 

otherwise > interpreted parameter mysqldump, instead of redirection operator.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -