public static CommandResult executeAndGetResults(String command, String stdInput) {
        try {
            return execute(command, null, null, stdInput);
        } catch (Exception e) {
            HyscaleException ex = new HyscaleException(e, CommonErrorCode.FAILED_TO_EXECUTE_COMMAND, command);
            logger.error("Error while reading command output,error {} for the standard input {}", ex, stdInput);
        }
        CommandResult commandResult = new CommandResult();
        commandResult.setExitCode(1);
        return commandResult;
    }
Executes command with the given input.

@param command
@param stdInput it is passed to the command as input
@return commandResult  if command execution fails it returns CommandResult with null CommandOutput and exit code as 1.
commons/src/main/java/io/hyscale/commons/commands/CommandExecutor.java