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
Post a Comment