public static String runCommandAndGetOutput(String command){

		try{
			Process proc = Runtime.getRuntime().exec(command);
			BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));

			String line = "";
			String output = "";
			while((line = reader.readLine()) != null){
				output += line;
			}

			proc.waitFor();

			return output;

		} catch (IOException | InterruptedException e){
			return "0";
		}


	}