Class BourneShell

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class BourneShell
    extends Shell
    • Constructor Detail

      • BourneShell

        public BourneShell()
      • BourneShell

        public BourneShell​(boolean isLoginShell)
    • Method Detail

      • getExecutable

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

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

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

        protected java.lang.String quoteOneItem​(java.lang.String path,
                                                boolean isExecutable)

        Unify quotes in a path for the Bourne Shell.

         BourneShell.quoteOneItem(null)                       = null
         BourneShell.quoteOneItem("")                         = ''
         BourneShell.quoteOneItem("/test/quotedpath'abc")     = '/test/quotedpath'"'"'abc'
         BourneShell.quoteOneItem("/test/quoted path'abc")    = '/test/quoted pat'"'"'habc'
         BourneShell.quoteOneItem("/test/quotedpath\"abc")    = '/test/quotedpath"abc'
         BourneShell.quoteOneItem("/test/quoted path\"abc")   = '/test/quoted path"abc'
         BourneShell.quoteOneItem("/test/quotedpath\"'abc")   = '/test/quotedpath"'"'"'abc'
         BourneShell.quoteOneItem("/test/quoted path\"'abc")  = '/test/quoted path"'"'"'abc'
         
        Overrides:
        quoteOneItem in class Shell
        Parameters:
        path - not null path.
        Returns:
        the path unified correctly for the Bourne shell.