Package net.sf.tweety.commons.util
Class Shell
- java.lang.Object
-
- net.sf.tweety.commons.util.Shell
-
- Direct Known Subclasses:
CygwinShell,NativeShell
public abstract class Shell extends Object
- Author:
- Nils Geilen Provides several ways to run unix commands on different OSes.
-
-
Constructor Summary
Constructors Constructor Description Shell()
-
Method Summary
Modifier and Type Method Description static ShellgetCygwinShell(String binary)a wrapper around the cygwin shellstatic ShellgetNativeShell()a wrapper for the os' native shellabstract Stringrun(String cmd)runs command
-
-
-
Method Detail
-
getNativeShell
public static Shell getNativeShell()
a wrapper for the os' native shell- Returns:
- a wrapper for the os' native shell
-
getCygwinShell
public static Shell getCygwinShell(String binary)
a wrapper around the cygwin shell- Parameters:
binary- path to bash.exe- Returns:
- a wrapper for the os' native shell
-
run
public abstract String run(String cmd) throws InterruptedException, IOException
runs command- Parameters:
cmd- the command to be run- Returns:
- the terminal output
- Throws:
InterruptedException- if some interruption occurred.IOException- if some IO issue occurred.
-
-