How to execute an operating system command that requires user interaction using a Scala process ?
To illustrate this, consider for instance passwd
in Unix/Linux OS, as follows,
import sys.process._
import scala.language.postfixOps
and so
scala> "passwd"!
(current) UNIX password: passwd: Authentication token manipulation error
passwd: password unchanged
Changing password for userabc
res0: Int = 10