Package org.tweetyproject.commons.util
Class Shell
java.lang.Object
org.tweetyproject.commons.util.Shell
- Direct Known Subclasses:
CygwinShell
,NativeShell
- Author:
- Nils Geilen Provides several ways to run unix commands on different OSes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Shell
getCygwinShell
(String binary) a wrapper around the cygwin shellstatic Shell
a wrapper for the os' native shellabstract String
runs command
-
Constructor Details
-
Shell
public Shell()
-
-
Method Details
-
getNativeShell
a wrapper for the os' native shell- Returns:
- a wrapper for the os' native shell
-
getCygwinShell
a wrapper around the cygwin shell- Parameters:
binary
- path to bash.exe- Returns:
- a wrapper for the os' native shell
-
run
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.
-