Shell

wvlet.airframe.control.Shell$
object Shell extends LogSupport

Launch UNIX (or cygwin) commands from Scala

Attributes

Graph
Supertypes
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Shell.type

Members list

Value members

Concrete methods

def env(key: String): Option[String]
def escape(s: String): String
def exec(cmdLine: String): Int

Launch a process then retrieves the exit code

Launch a process then retrieves the exit code

Attributes

def execRemote(hostname: String, cmdLine: String): Int
def findCommand(name: String): Option[String]
def findJavaCommand(javaCmdName: String): Option[String]
def findJavaHome: Option[String]
def findSh: Option[String]
def getCommand(name: String): String
def getEnv: Map[String, String]
def getExecPath: Array[String]
def getProcessID(p: Process): Option[Int]

Returns process id

Returns process id

Attributes

Returns

process id or -1 if pid cannot be detected

Return the process ID of the current JVM.

Return the process ID of the current JVM.

Attributes

Returns

process id or -1 when process ID is not found.

def kill(pid: Int, signal: String): Int

Kills the process

Kills the process

Attributes

def killTree(pid: Int, signal: String): Int

Kill the process tree rooted from pid

Kill the process tree rooted from pid

Attributes

Returns

exit code

def launchCmdExe(cmdLine: String): Process
def launchJava(args: String): Process
def launchProcess(cmdLine: String): Process
def launchRemoteDaemon(host: String, cmdLine: String): Unit

launch a command in the remote host. The target host needs to be accessed via ssh command without password.

launch a command in the remote host. The target host needs to be accessed via ssh command without password.

Attributes

def prepareProcessBuilder(cmdLine: String, inheritIO: Boolean): ProcessBuilder
def prepareProcessBuilderFromSeq(tokens: Seq[String], inheritIO: Boolean): ProcessBuilder
def progName(p: String): String

Return OS-dependent program name. (e.g., sh in Unix, sh.exe in Windows)

Return OS-dependent program name. (e.g., sh in Unix, sh.exe in Windows)

Attributes

def sysProp(key: String): Option[String]
def unescape(s: String): String

Inherited methods

inline protected def debug(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def debug(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def error(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def info(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def info(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def logAt(inline logLevel: LogLevel, inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def trace(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def trace(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggingMethods
inline protected def warn(inline message: Any): Unit

Attributes

Inherited from:
LoggingMethods