Class ShellUtil

java.lang.Object
com.chatopera.bot.utils.ShellUtil

public class ShellUtil extends Object
  • Field Details

    • PWD

      public static final String PWD
  • Constructor Details

    • ShellUtil

      public ShellUtil()
  • Method Details

    • pwd

      public static String pwd()
      返回当前脚本执行路径
      Returns:
    • command

      public static int command(String cmdline)
      运行命令
      Parameters:
      cmdline -
      Returns:
    • command

      public static int command(String cmdline, String directory)
      在指定路径运行命令 Returns null if it failed for some reason.
    • command

      public static int command(String cmdline, String directory, ArrayList<String> result)
      在指定路径运行命令并返回标准输出 Returns null if it failed for some reason.