Class BourneShell

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class BourneShell
    extends Shell
    • Field Detail

      • BASH_QUOTING_TRIGGER_CHARS

        private static final char[] BASH_QUOTING_TRIGGER_CHARS
    • Constructor Detail

      • BourneShell

        public BourneShell()
        Create instance of BournShell.
    • Method Detail

      • getExecutable

        public java.lang.String getExecutable()
        Overrides:
        getExecutable in class Shell
        Returns:
        The executable.
      • getShellArgsList

        public java.util.List<java.lang.String> getShellArgsList()
        Overrides:
        getShellArgsList in class Shell
      • getShellArgs

        public java.lang.String[] getShellArgs()
        Get the shell arguments
        Overrides:
        getShellArgs in class Shell
        Returns:
        The arguments
      • unifyQuotes

        private static java.lang.String unifyQuotes​(java.lang.String path)

        Unify quotes in a path for the Bourne Shell.

         BourneShell.unifyQuotes(null)                       = null
         BourneShell.unifyQuotes("")                         = (empty)
         BourneShell.unifyQuotes("/test/quotedpath'abc")     = /test/quotedpath\'abc
         BourneShell.unifyQuotes("/test/quoted path'abc")    = "/test/quoted path'abc"
         BourneShell.unifyQuotes("/test/quotedpath\"abc")    = "/test/quotedpath\"abc"
         BourneShell.unifyQuotes("/test/quoted path\"abc")   = "/test/quoted path\"abc"
         BourneShell.unifyQuotes("/test/quotedpath\"'abc")   = "/test/quotedpath\"'abc"
         BourneShell.unifyQuotes("/test/quoted path\"'abc")  = "/test/quoted path\"'abc"
         
        Parameters:
        path - not null path.
        Returns:
        the path unified correctly for the Bourne shell.