Package fi.evolver.script
Class Shell
java.lang.Object
fi.evolver.script.Shell
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetGlobalLogWriter(Writer globalLogWriter) static StringRun an external command with root privileges.static StringRun an external command with root privileges.static StringRun an external command as the current user.static StringRun an external command as the current user.
-
Field Details
-
HOME
-
BASHRC
-
USER
-
-
Constructor Details
-
Shell
public Shell()
-
-
Method Details
-
setGlobalLogWriter
-
user
Run an external command as the current user. Fails on non-zero exit value.- Parameters:
command- The command to run.- Returns:
- Standard output returned by the program.
-
user
Run an external command as the current user. Fails on non-zero exit value.- Parameters:
command- The command to run.- Returns:
- Standard output returned by the program.
-
sudo
Run an external command with root privileges. Fails on non-zero exit value.- Parameters:
command- The command to run.- Returns:
- Standard output returned by the program.
-
sudo
Run an external command with root privileges. Fails on non-zero exit value.- Parameters:
command- The command to run.- Returns:
- Standard output returned by the program.
-