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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -