001package Torello.Java;
002
003import java.io.*;
004import java.util.*;
005import java.util.regex.*;
006
007import java.util.concurrent.CompletionException;
008import java.util.function.Consumer;
009
010import Torello.Java.*;
011import Torello.HTML.*;
012import Torello.HTML.NodeSearch.*;
013import Torello.Java.Additional.*;
014
015import Torello.HTML.Tools.JavaDoc.StaticFunctional;
016import Torello.HTML.Tools.JavaDoc.Excuse;
017
018/**
019 * A great tool for working with a UNIX operating-system.
020 * 
021 * <BR /><BR />
022 * <EMBED CLASS="external-html" DATA-FILE-ID="SHELL">
023 * <EMBED CLASS="external-html" DATA-FILE-ID="SH_COMMAND">
024 * <EMBED CLASS="external-html" DATA-FILE-ID="OS_WILD_CARD">
025 * <EMBED CLASS="external-html" DATA-FILE-ID="SH_WILD_CARD">
026 * <EMBED CLASS="external-html" DATA-FILE-ID="WORA">
027 * @see Shell.XL
028 * @see OSResponse
029 * @see OSResponse#stdOut
030 * @see OSResponse#stdErr
031 * @see OSResponse#response
032 * @see FileNode
033 */
034@StaticFunctional
035    (Excused={"appendable", "cmdOrCmdAndOutput"},Excuses={Excuse.LOGGING, Excuse.LOGGING})
036public class Shell
037{
038    private Shell() { }
039
040    /**
041     * If Java is not running on a UNIX machine, the terminal output that contains "color" will not function.
042     * If it does not, then the Shell color commands will default to empty, zero-length strings.
043     * 
044     * <BR /><BR /><B CLASS=JDRedLabel>WINDOWS SUPPORT:</B>
045     * 
046     * <BR />Since Windows Release 1909, which was the 2019 Version of Windows 10, MS-DOS Command
047     * Prompt Windows will also support ANSI Color-Code Escape Sequences;
048     */
049    public static final boolean colorANSI;
050
051    static
052    {
053        String  osName  = System.getProperty("os.name");
054        String  osArch  = System.getProperty("os.arch");
055        String  osVers  = System.getProperty("os.version");
056        boolean windows = StrCmpr.containsIgnoreCase(osName, "win");
057        boolean unix    = StrCmpr.containsOR_CI(osName, "nix", "nux", "aix");
058        float   version = -1;
059
060        if (windows)
061            try
062                { version = Float.parseFloat(osVers); }
063            catch (Exception e)
064                { }
065
066        /*
067        // Finding out where this class works is more difficult than you realize
068        System.out.println(
069            "os.name:    " + osName + '\n' +
070            "os.arch:    " + osArch + '\n' +
071            "os.version: " + osVers + '\n' +
072            "version: "    + version
073        );
074        Q.BP();
075        */
076
077        if (windows)    colorANSI = (version >= 10);
078        else if (unix)  colorANSI = true;
079
080        else if (StrCmpr.containsIgnoreCase(osName, "max"))             colorANSI = false;
081        else if (StrCmpr.containsIgnoreCase(osName, "sunos"))           colorANSI = false;
082        else                                                            colorANSI = true;
083    }
084
085    /**
086     * <EMBED CLASS="external-html" DATA-FILE-ID="OSLOG">
087     * <BR />
088     * <EMBED CLASS="external-html" DATA-FILE-ID="APPENDABLE">
089     * @see StorageWriter
090     */
091    public static Appendable appendable = System.out;
092
093
094    /**
095     * Allows the user to decide between printing the command, or the command and the output of
096     * that command.
097     * 
098     * <BR />When this field is set to {@code TRUE}, only the command will be printed to the output
099     * {@link #appendable} field.  When this is set to {@code FALSE}, <B>BOTH</B> the command
100     * <B>AND</B> the output from that command are printed to {@link #appendable}.
101     * 
102     * <BR /><BR /><B STYLE='color: red;'>NOTE:</B> If you would like the methods in this class
103     * to run fully silent, set the {@link #appendable} field to {@link NOPRINT#np}, and nothing
104     * will be printed.
105     * 
106     * <BR /><bR /><B STYLE='color: red;'>IMPORTANT:</B> Regardless of the log-printing settings 
107     * applied to the fields {@link #appendable} and this field, the output generated by these
108     * commands in this class shall still be available in the {@link OSResponse} fields
109     * {@link OSResponse#stdOut} &amp; {@link OSResponse#stdErr}.
110     * 
111     * <BR /><BR /><B STYLE='color: red;'>DEFAULT:</B> The initialized-setting for this field
112     * is {@code FALSE}, again, meaning both the command itself, and its output, will be printed 
113     * to the {@code appendable} log (whose value is initialized to {@code 'System.out'}).
114     */
115    public static boolean cmdOrCmdAndOutput = false;
116
117    /**
118     * A UNIX Terminal Color-Codes implementation for printing colored text to terminal.
119     * 
120     * <BR /><BR /><EMBED CLASS="external-html" DATA-FILE-ID="SHELLC">
121     */
122    @StaticFunctional
123    public static class C
124    {
125        private C() { }
126
127        public static final String RESET            = colorANSI ? "\u001B[0m"  : "";
128
129        public static final String BLACK            = colorANSI ? "\u001B[30m" : "";
130        public static final String RED              = colorANSI ? "\u001B[31m" : "";
131        public static final String GREEN            = colorANSI ? "\u001B[32m" : "";
132        public static final String YELLOW           = colorANSI ? "\u001B[33m" : "";
133        public static final String BLUE             = colorANSI ? "\u001B[34m" : "";
134        public static final String PURPLE           = colorANSI ? "\u001B[35m" : "";
135        public static final String CYAN             = colorANSI ? "\u001B[36m" : "";
136        public static final String WHITE            = colorANSI ? "\u001B[37m" : "";
137
138        public static final String BLACK_BKGND      = colorANSI ? "\u001B[40m" : "";
139        public static final String RED_BKGND        = colorANSI ? "\u001B[41m" : "";
140        public static final String GREEN_BKGND      = colorANSI ? "\u001B[42m" : "";
141        public static final String YELLOW_BKGND     = colorANSI ? "\u001B[43m" : "";
142        public static final String BLUE_BKGND       = colorANSI ? "\u001B[44m" : "";
143        public static final String PURPLE_BKGND     = colorANSI ? "\u001B[45m" : "";
144        public static final String CYAN_BKGND       = colorANSI ? "\u001B[46m" : "";
145        public static final String WHITE_BKGND      = colorANSI ? "\u001B[47m" : "";
146
147        public static final String BBLACK           = colorANSI ? "\u001B[90m" : "";
148        public static final String BRED             = colorANSI ? "\u001B[91m" : "";
149        public static final String BGREEN           = colorANSI ? "\u001B[92m" : "";
150        public static final String BYELLOW          = colorANSI ? "\u001B[93m" : "";
151        public static final String BBLUE            = colorANSI ? "\u001B[94m" : "";
152        public static final String BPURPLE          = colorANSI ? "\u001B[95m" : "";
153        public static final String BCYAN            = colorANSI ? "\u001B[96m" : "";
154        public static final String BWHITE           = colorANSI ? "\u001B[97m" : "";
155
156        public static final String BBLACK_BKGND     = colorANSI ? "\u001B[100m" : "";
157        public static final String BRED_BKGND       = colorANSI ? "\u001B[101m" : "";
158        public static final String BGREEN_BKGND     = colorANSI ? "\u001B[102m" : "";
159        public static final String BYELLOW_BKGND    = colorANSI ? "\u001B[103m" : "";
160        public static final String BBLUE_BKGND      = colorANSI ? "\u001B[104m" : "";
161        public static final String BPURPLE_BKGND    = colorANSI ? "\u001B[105m" : "";
162        public static final String BCYAN_BKGND      = colorANSI ? "\u001B[106m" : "";
163        public static final String BWHITE_BKGND     = colorANSI ? "\u001B[107m" : "";
164
165        private static final String CSS_DEFINITIONS_FILE        = "data15.sdat";
166        private static final String HTML_SPANS_DEFINITIONS_FILE = "data16.sarrdat";
167
168        @SuppressWarnings({"unchecked", "rawtypes"})
169        private static final Vector v = LFEC.readObjectFromFile_JAR
170            (Torello.Data.DataFileLoader.class, HTML_SPANS_DEFINITIONS_FILE, true, Vector.class);
171
172        // This list has:
173        // "</SPAN>" (Maps to: C.RESET)
174        // "<SPAN CLASS=SC1>" through SC8 (Maps to: C.BLACK ... C.WHITE)
175        // "<SPAN CLASS=SB1>" through SB8 (Maps to: C.BLACK_BKGND ... C.WHITE_BKGND)
176        // "<SPAN CLASS=BC1>" through BC8 (Maps to: C.BBLACK ... C.BWHITE)
177        // "<SPAN CLASS=BB1>" through BB8 (Maps to: C.BBLACK_BKGND ... C.BWHITE_BKGND)
178        @SuppressWarnings("unchecked")
179        private static final String[] htmlSpansCSSClasses = (String[]) v.elementAt(0);
180
181        // This list is identical to the one above, but uses **INLINE** STYLE ATTRIBUTES:
182        // C.RESET          ==> "</SPAN>"
183        // C.BLACK          ==> "<SPAN style='color: black;'>"
184        // C.BLACK_BKGND    ==> "<SPAN style='background: black;'>"
185        // C.BBLACK         ==> "<SPAN style='color: black;  font-weight: bold;'>"
186        // C.BBLACK_BKGN    ==> "<SPAN style='background: brightblack;'>"
187        @SuppressWarnings("unchecked")
188        private static final String[] htmlSpansStyleAttributes = (String[]) v.elementAt(1);
189
190        // Efficiently (using HashMap) converts a "Char Code String" to an array position
191        // The "Char Code String" may be any one of the 33 String defined in this class.
192        // The array position is an index into the PREVIOUS TWO ARRAYS.
193        @SuppressWarnings("unchecked")
194        private static final HashMap<String, Integer> charCodesMap =
195            (HashMap<String, Integer>) v.elementAt(2);
196
197        // less efficient version, 'StrRepace' requires this...  Note - these Strings are all
198        // extremely short.  There isn't a way to improve StrReplace in this regard - it *MUST*
199        // check for *ALL* of the codes...
200        private static final String[] charCodesArr = (String[]) v.elementAt(3);
201
202
203        /**
204         * This will convert a UNIX 'Character Code' into an HTML Tag if it is necessary to convert
205         * UNIX colored-text into HTML.
206         * 
207         * <BR /><BR /><B STYLE='color:red;'>NOTE:</B> This method returns an HTML {@code SPAN}
208         * tag which employs a {@code CSS CLASS}.  It is (hopefully) obvious that the definitiions
209         * for any / all {@code CSS CLASSES} that are used will need to be provided on the page.
210         * 
211         * <BR /><BR />The method {@link #getCSSDefinitions()} will return the complete definition
212         * page for all {@code CSS CLASSES} that are employed by this method.
213         * 
214         * <BR /><BR />You may also view the contents of the CSS Definitions Below:
215         * 
216         * <BR /><BR /><B><A HREF="Shell.C.css">Shell.C CSS Definitions</A></B>
217         * 
218         * @param charCode Any one of the 33 codes defined in this class.
219         * 
220         * @return An HTML {@code <SPAN CLASS=...>} element that may be used as a substitute for
221         * one of the codes defined in this class.
222         * 
223         * @throws IllegalArgumentException If the {@code String} that is passed to parameter
224         * {@code 'charCode'} is not one of the defined codes in this class.
225         * 
226         * @see #getCSSDefinitions()
227         */
228        public static String span(String charCode)
229        {
230            Integer arrPos = charCodesMap.get(charCode);
231
232            if (arrPos == null) throw new IllegalArgumentException(
233                "The value passed to parameter 'charCode' is not one of the defined codes in " +
234                "this class."
235            );
236
237            return htmlSpansCSSClasses[arrPos];
238        }
239
240        /**
241         * This will convert a UNIX 'Character Code' into an HTML Tag if it is necessary to convert
242         * UNIX colored-text into HTML.
243         * 
244         * <BR /><BR /><B STYLE='color:red;'>NOTE:</B> This method returns an HTML {@code SPAN}
245         * tag which employs an <B>inline {@code 'STYLE'} tag</B>.  Remember, if you are converting
246         * large text-{@code String's} into HTML, using inlne {@code 'STYLE'} attributes could
247         * potentially make your HTML file grow much larger, rather quickly.
248         * 
249         * <BR /><BR />Using {@code CSS CLASSES} provided by method {@code span(String)} <I>will
250         * make your generated HTML <B>somewhat</B> more efficient.</I>  If you do, you will need
251         * to import the CSS Definitions for these classes.
252         * 
253         * @param charCode Any one of the 33 codes defined in this class.
254         * 
255         * @return An HTML {@code <SPAN STYLE=...>} element that may be used as a substitute for
256         * one of the color-codes defined in this class.
257         * 
258         * @throws IllegalArgumentException If the {@code String} that is passed to parameter
259         * {@code 'charCode'} is not one of the defined codes in this class.
260         */
261        public static String spanInlineStyle(String charCode)
262        {
263            Integer arrPos = charCodesMap.get(charCode);
264
265            if (arrPos == null) throw new IllegalArgumentException(
266                "The value passed to parameter 'charCode' is not one of the defined codes in " +
267                "this class."
268            );
269
270            return htmlSpansStyleAttributes[arrPos];
271        }
272
273        /**
274         * Convenience Method.
275         * <BR />Invokes: {@link #toHTML(String, boolean, boolean, boolean)}
276         */
277        public static String toHTML(String text) { return toHTML(text, false, true, false); }
278
279        // Used in method below
280        private static final String[] MATCH_STRS_1 = { "<", ">", "\n\r", "\r\n", "\n", "\r" };
281        private static final String[] MATCH_STRS_2 = { "<", ">" };
282        private static final String[] MATCH_STRS_3 = { "\n\r", "\r\n", "\n", "\r" };
283
284        private static final String REPLACER(int i, String s)
285        {
286            switch (s)
287            {
288                case "<" : return "&lt;";
289                case ">" : return "&gt;";
290                case "\n" :
291                case "\r" :
292                case "\n\r" : 
293                case "\r\n" : return "<BR />\n";
294                default: throw new UnreachableError();
295            }
296        }
297
298        /**
299         * Converts the instances of these escape-sequences that are found inside of Java
300         * {@code String's} that were generated using these ANSI UNIX color escape sequences, and
301         * produces a valid HTML {@code String} that contains HTML
302         * {@code <SPAN STYLE="color-information">} replacements!
303         *
304         * <BR /><BR /><B><SPAN STYLE="color: red;">NOTE:</B></SPAN> Any new-line characters
305         * sequences such as {@code '\n'} and {@code '\r\n'} will be replaces with HTML
306         * {@code <BR />} elements.
307         * 
308         * @param text This should be any string, usually one that is saved from a
309         * {@code 'StorageWriter'}, although any text that includes these UNIX Color Escape Codes
310         * is fine.
311         * 
312         * @param preFormat When this parameter receives <B>FALSE</B>, everywhere in the input
313         * text-{@code String} that a {@code CRLF} (new-line) occurs, that newline will be replaced
314         * by an HTML {@code <BR />} element, in addition to the original newline.
315         * 
316         * <BR /><BR />This parameter is referring to the CSS {@code 'white-space: pre'} setting,
317         * which can be used.  Althought, sometimes going with the plain-old-vanilla {@code <BR />}
318         * tag can also be advisable.
319         * 
320         * @param escapeHTMLElements Whenever HTML is sent to the input-parameter 'text' - if the
321         * intention is to render the HTML using the browser, this parameter should be
322         * <B>FALSE</B>.  If it is intended to allow the UI to "show the HTML" like it were
323         * text-to-be-viewed, then each and every greater-than-symbol {@code '>'} and also every
324         * less-than-symbol {@code '<'} will be escaped.  This is done to prevent the browser from
325         * trying to parse the text as HTML.
326         * 
327         * @param useCSSClasses When this parameter receives <B>TRUE</B>, all returned
328         * {@code <SPAN STYLE=...>} elements shall be converted to using a simplified
329         * {@code CSS Class Name}.  The {@code CLASS} definitions for the returned {@code String}
330         * can be retrieved by simply calling the method: {@link #getCSSDefinitions()}.
331         * 
332         * <BR /><BR /><B><SPAN STYLE="color: red;">IMPORTANT:</SPAN></B> If this parameter does
333         * receive a <B>TRUE</B> value, it is imperitive to include the {@code CSS STYLE}
334         * definitions that are returned by the above mentioned method, or else the colors shall
335         * not be visible.
336         * 
337         * <BR /><BR />You may view the contents of the CSS Definitions Below:
338         * 
339         * <BR /><BR /><B><A HREF="Shell.C.css">Shell.C CSS Definitions</A></B>
340         * 
341         * @return Every UNIX-ANSI color escape-sequence that is found/identified in this text will
342         * be replaced with an HTML
343         * {@code <SPAN STYLE="color: a-color; background: a-background-color">} element.
344         */ 
345        public static String toHTML
346            (String text, boolean preFormat, boolean escapeHTMLElements, boolean useCSSClasses)
347        {
348            // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
349            // Old Way, much less efficient
350            // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
351
352            // If the input text, itself, has HTML elements, then those have to be "escaped" to
353            // properly render.  If the intention was to have them rendered has HTML Elements
354            // (not text), then this boolean should be false.
355
356            // if (escapeHTMLElements) text = text.replace("<", "&lt;").replace(">", "&gt;");
357
358            // With "Pre-Formatted Text" - there is no need to add "<BR />" where line-breaks
359            // occur CRLF will automatically be inserted courtesy of the browser
360
361            // if (! preFormat) text = text.replaceAll("\n|\r\n|\r", "<BR />\n");
362
363
364            // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
365            // Quite a bit faster
366            // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
367
368            String[] matchStrs = null;
369
370            // Replaces both '<', '>' **AND** '\n', '\r', '\n\r', '\r\n' (all at once)
371            if (escapeHTMLElements && (! preFormat))            matchStrs = MATCH_STRS_1;
372
373            // Replaces ONLY '<' and '>'
374            else if (escapeHTMLElements && preFormat)           matchStrs = MATCH_STRS_2;
375
376            // Replaces ONLY '\n', '\r', '\n\r', '\r\n'
377            else if ((! escapeHTMLElements) && (! preFormat))   matchStrs = MATCH_STRS_3;
378
379            // NOW RUN IT...
380            if (matchStrs != null) text = StrReplace.r(text, matchStrs, Shell.C::REPLACER);
381
382            return StrReplace.r(
383                text, charCodesArr, 
384                useCSSClasses ? htmlSpansCSSClasses : htmlSpansStyleAttributes
385            );
386        }
387
388        /**
389         * If the {@code 'useCSSDefinitions'} option is selected with the
390         * {@link #toHTML(String, boolean, boolean, boolean)} method, then the {@code String}
391         * returned from this method shall provide the {@code CSS Style} definitions needed to use
392         * the colors provided by {@code toHTML(...)}
393         * 
394         * @return This shall visit the internal data-files for this JAR distribution, and return a
395         * list of {@code CSS Style} definitions that will colorize the HTML produced by an
396         * invocation of {@code toHTML()}.
397         * 
398         * <BR /><BR />You may view the contents of the CSS Definitions Below:
399         * 
400         * <BR /><BR /><B><A HREF="Shell.C.css">Shell.C CSS Definitions</A></B>
401         */
402        public static String getCSSDefinitions()
403        {
404            return LFEC.readObjectFromFile_JAR
405                (Torello.Data.DataFileLoader.class, CSS_DEFINITIONS_FILE, true, String.class);
406        }
407    }
408
409    /**
410     * UNIX Shell Command: {@code Copy}
411     * <DIV CLASS="SHELL">{@code
412     * $ cp <src> <target>
413     * }</DIV>
414     * @param src UNIX/Linux/BASH-Shell {@code 'cp'} command's "source" argument
415     * @param target The {@code 'cp'} command "target" argument
416     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
417     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
418     * @throws IOException If there are problems while invoking the operating-system command
419     */
420    public static OSResponse CP(String src, String target) throws IOException
421    { 
422        String[] command = { "cp", src, target };
423
424        OSResponse.PRINT_CMD(command, appendable);
425
426        return OSResponse.RUN_CMD_PRINT_OUTPUT
427            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
428    }
429
430    /**
431     * UNIX Shell Command: {@code Copy}
432     * <DIV CLASS="SHELL">{@code
433     * $ cp <src.elementAt(0)> <src.elementAt(1)> ... <src.elementAt(src.size()-1)> <target>
434     * }</DIV>
435     * @param src This may be a list of files to be copied to a target directory
436     * @param target This is the target directory for the files listed.
437     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
438     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
439     * @throws IOException If there are problems while invoking the operating-system command
440     */
441    public static OSResponse CP(Vector<String> src, String target) throws IOException
442    {
443        String[] command = new String[src.size() + 2];
444        command[0] = "cp";
445        command[src.size() + 1] = target;
446
447        for (int i=0; i < src.size(); i++) command[1 + i] = src.elementAt(i);
448
449        OSResponse.PRINT_CMD(command, appendable);
450
451        return OSResponse.RUN_CMD_PRINT_OUTPUT
452            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
453    }
454
455    /**
456     * UNIX Shell Command: {@code Copy}
457     * <DIV CLASS="SHELL">{@code
458     * $ cp <src[0]> <src[1]> ... <src[src.length-1]> <target>
459     * }</DIV>
460     * @param src This may be a list of files to be copied to a target directory
461     * @param target This is the target directory for the files listed.
462     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
463     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
464     * @throws IOException If there are problems while invoking the operating-system command
465     */
466    public static OSResponse CP(String[] src, String target) throws IOException
467    {
468        String[] command = new String[src.length + 2];
469        command[0] = "cp";
470        command[src.length + 1] = target;
471
472        for (int i=0; i < src.length; i++) command[1 + i] = src[i];
473
474        OSResponse.PRINT_CMD(command, appendable);
475
476        return OSResponse.RUN_CMD_PRINT_OUTPUT
477            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
478    }   
479
480    /**
481     * UNIX Shell Command: {@code List}
482     * <DIV CLASS="SHELL">{@code
483     * $ ls <fileOrDir>
484     * }</DIV>
485     * @param fileOrDir This is the file <B><I>OR</I></B> directory to be searched.
486     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
487     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
488     * @throws IOException If there are problems while invoking the operating-system command
489     */
490    public static OSResponse LS(String fileOrDir) throws IOException
491    { 
492        String[] command = { "ls", fileOrDir };
493
494        OSResponse.PRINT_CMD(command, appendable);
495
496        return OSResponse.RUN_CMD_PRINT_OUTPUT
497            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
498    }
499
500    /**
501     * UNIX Shell Command: {@code List}
502     * <DIV CLASS="SHELL">{@code
503     * $ ls <switches> <fileOrDir>
504     * }</DIV>
505     * @param fileOrDir This is the file <B><I>OR</I></B> directory to be searched.
506     * @param switches These are switches that are added to the command.
507     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
508     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
509     * @throws IOException If there are problems while invoking the operating-system command
510     */
511    public static OSResponse LS(String fileOrDir, String switches)
512        throws IOException
513    { 
514        String[] command = { "ls", switches, fileOrDir };
515
516        OSResponse.PRINT_CMD(command, appendable);
517
518        return OSResponse.RUN_CMD_PRINT_OUTPUT
519            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
520    }
521
522    /**
523     * UNIX Shell Command: {@code Move}
524     * <DIV CLASS="SHELL">{@code
525     * $ mv <src> <target>
526     * }</DIV>
527     * @param src The first {@code String} in a typical UNIX {@code 'move'} command. It is the
528     * "source file"
529     * @param target The second {@code String} for a "move."  This is the destination or target.
530     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
531     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
532     * @throws IOException If there are problems while invoking the operating-system command
533     */
534    public static OSResponse MV(String src, String target) throws IOException
535    { 
536        String[] command = { "mv", src, target };
537
538        OSResponse.PRINT_CMD(command, appendable);
539
540        return OSResponse.RUN_CMD_PRINT_OUTPUT
541            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
542    }
543
544    /**
545     * UNIX Shell Command: {@code Move}
546     * <DIV CLASS="SHELL">{@code
547     * $ mv <src.elementAt(0)> <src.elementAt(1)> ... <src.elementAt(src.size()-1)> <target>
548     * }</DIV>
549     * @param src The first {@code String} in a typical UNIX {@code 'move'} command.
550     * It is the "source file" - In this method, it is a list of files and expressions saved as a
551     * {@code Vector}.
552     * @param target The second {@code String} for a {@code 'move'} UNIX command, and it is the
553     * target destination of the source-file.
554     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
555     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
556     * @throws IOException If there are problems while invoking the operating-system command
557     */
558    public static OSResponse MV(Vector<String> src, String target) throws IOException
559    {
560        String[] command = new String[src.size() + 2];
561        command[0] = "mv";
562        command[src.size() + 1] = target;
563
564        for (int i=0; i < src.size(); i++) command[1 + i] = src.elementAt(i);
565
566        OSResponse.PRINT_CMD(command, appendable);
567
568        return OSResponse.RUN_CMD_PRINT_OUTPUT
569            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
570    }
571
572    /**
573     * UNIX Shell Command: {@code Move}
574     * <DIV CLASS="SHELL">{@code
575     * $ mv <src[0]> <src[1]> ... <src[src.length-1]> <target>
576     * }</DIV>
577     * @param src The first {@code String} in a typical UNIX {@code 'move'} command.
578     * It is the "source file" - In this method, it is a list of files and expressions saved as an
579     * array.
580     * @param target The second {@code String} for a UNIX {@code 'move'} command, and it is the
581     * target destination
582     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
583     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
584     * @throws IOException If there are problems while invoking the operating-system command
585     */
586    public static OSResponse MV(String[] src, String target) throws IOException
587    {
588        String[] command = new String[src.length + 2];
589        command[0] = "mv";
590        command[src.length + 1] = target;
591
592        for (int i=0; i < src.length; i++) command[1 + i] = src[i];
593
594        OSResponse.PRINT_CMD(command, appendable);
595
596        return OSResponse.RUN_CMD_PRINT_OUTPUT
597            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
598    }
599
600    /**
601     * UNIX Shell Command: {@code Remove}
602     * <DIV CLASS="SHELL">{@code
603     * $ rm <s1>
604     * }</DIV>
605     * @param s1 The item to be removed, using a UNIX operating-system command.
606     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
607     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
608     * @throws IOException If there are problems while invoking the operating-system command
609     */
610    public static OSResponse RM(String s1) throws IOException
611    { 
612        String[] command = { "rm", s1 };
613
614        OSResponse.PRINT_CMD(command, appendable);
615
616        return OSResponse.RUN_CMD_PRINT_OUTPUT
617            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
618    }
619
620    /**
621     * UNIX Shell Command: {@code Remove}
622     * <DIV CLASS="SHELL">{@code
623     * $ rm <sArr[0]> <sArr[1]> ... <sArr[sArr.length-1]>
624     * }</DIV>
625     * @param sArr An {@code String[] array} which is added to the end of this UNIX command.
626     * These will be the item(s) removed by the UNIX {@code 'RM'} command.
627     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
628     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
629     * @throws IOException If there are problems while invoking the operating-system command
630     */
631    public static OSResponse RM(String[] sArr) throws IOException
632    {
633        String[] command = new String[sArr.length + 1];
634        command[0] = "rm";
635
636        for (int i=0; i < sArr.length; i++) command[i + 1] = sArr[i];
637
638        OSResponse.PRINT_CMD(command, appendable);
639
640        return OSResponse.RUN_CMD_PRINT_OUTPUT
641            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
642    }
643
644    /**
645     * UNIX Shell Command: {@code Remove}
646     * <DIV CLASS="SHELL">{@code
647     * $ rm  <src.elementAt(0)> <src.elementAt(1)> ... <src.elementAt(src.size()-1)>
648     * }</DIV>
649     * @param v A {@code Vector<String>} that contains command-line-parameters which
650     * are added, sequentially, to the end of this UNIX command.  The {@code String's} in
651     * this {@code Vector} are the item(s) to be removed by the UNIX {@code 'RM'} command.
652     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
653     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
654     * @throws IOException If there are problems while invoking the operating-system command
655     */
656    public static OSResponse RM(Vector<String> v) throws IOException
657    {
658        String[] command = new String[v.size() + 1];
659        command[0] = "rm";
660
661        for (int i=0; i < v.size(); i++) command[i + 1] = v.elementAt(i);
662
663        OSResponse.PRINT_CMD(command, appendable);
664
665        return OSResponse.RUN_CMD_PRINT_OUTPUT
666            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
667    }
668
669    /**
670     * UNIX Shell Command: {@code Remove}
671     * <DIV CLASS="SHELL">{@code
672     * $ rm <switches> <s1>
673     * }</DIV>
674     * @param s1 A file or directory parameter passed to {@code 'RM'}
675     * @param switches These are switches (for-instance: {@code -R}, recursive).
676     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
677     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
678     * @throws IOException If there are problems while invoking the operating-system command
679     */
680    public static OSResponse RM(String s1, String switches) throws IOException
681    { 
682        String[] command = { "rm", switches, s1 };
683
684        OSResponse.PRINT_CMD(command, appendable);
685
686        return OSResponse.RUN_CMD_PRINT_OUTPUT
687            (command, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
688    }
689
690    /**
691     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code tar}</B>
692     *
693     * <DIV CLASS="SHELL">{@code
694     * $ tar <args[0]> <args[1]> ... <args[args.length-1]>
695     * }</DIV>
696     * @param args Any set of switches and/or arguments to this BASH command.
697     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
698     * @throws IOException If there are problems while invoking the operating-system command
699     */
700    public static OSResponse TAR(String... args) throws IOException
701    { return ARGS_PLUS_ONE("tar", args); }
702
703    /**
704     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code jar}</B>
705     *
706     * <DIV CLASS="SHELL">{@code
707     * $ jar <args[0]> <args[1]> ... <args[args.length-1]>
708     * }</DIV>
709     * @param args Any set of switches and/or arguments to this BASH command.
710     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
711     * @throws IOException If there are problems while invoking the operating-system command
712     */
713    public static OSResponse JAR(String... args) throws IOException
714    { return ARGS_PLUS_ONE("jar", args); }
715
716    /**
717     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code grep}</B>
718     *
719     * <DIV CLASS="SHELL">{@code
720     * $ grep <args[0]> <args[1]> ... <args[args.length-1]>
721     * }</DIV>
722     * @param args Any set of switches and/or arguments to this BASH command.
723     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
724     * @throws IOException If there are problems while invoking the operating-system command
725     */
726    public static OSResponse GREP(String... args) throws IOException
727    { return ARGS_PLUS_ONE("grep", args); }
728
729    /**
730     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code find}</B>
731     *
732     * <DIV CLASS="SHELL">{@code
733     * $ find <args[0]> <args[1]> ... <args[args.length-1]>
734     * }</DIV>
735     * @param args Any set of switches and/or arguments to this BASH command.
736     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
737     * @throws IOException If there are problems while invoking the operating-system command
738     */
739    public static OSResponse FIND(String... args) throws IOException
740    { return ARGS_PLUS_ONE("find", args); }
741
742    /**
743     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code du}</B>
744     *
745     * <DIV CLASS="SHELL">{@code
746     * $ du <args[0]> <args[1]> ... <args[args.length-1]>
747     * }</DIV>
748     * @param args Any set of switches and/or arguments to this BASH command.
749     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
750     * @throws IOException If there are problems while invoking the operating-system command
751     */
752    public static OSResponse DU(String... args) throws IOException
753    { return ARGS_PLUS_ONE("du", args); }
754
755    /**
756     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code df}</B>
757     *
758     * <DIV CLASS="SHELL">{@code
759     * $ df <args[0]> <args[1]> ... <args[args.length-1]>
760     * }</DIV>
761     * @param args Any set of switches and/or arguments to this BASH command.
762     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
763     * @throws IOException If there are problems while invoking the operating-system command
764     */
765    public static OSResponse DF(String... args) throws IOException
766    { return ARGS_PLUS_ONE("df", args); }
767
768    /**
769     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code sed}</B>
770     *
771     * <DIV CLASS="SHELL">{@code
772     * $ sed <args[0]> <args[1]> ... <args[args.length-1]>
773     * }</DIV>
774     * @param args Any set of switches and/or arguments to this BASH command.
775     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
776     * @throws IOException If there are problems while invoking the operating-system command
777     */
778    public static OSResponse SED(String... args) throws IOException
779    { return ARGS_PLUS_ONE("sed", args); }
780
781    /**
782     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code whatis}</B>
783     *
784     * <DIV CLASS="SHELL">{@code
785     * $ whatis <args[0]> <args[1]> ... <args[args.length-1]>
786     * }</DIV>
787     * @param args Any set of switches and/or arguments to this BASH command.
788     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
789     * @throws IOException If there are problems while invoking the operating-system command
790     */
791    public static OSResponse WHATIS(String... args) throws IOException
792    { return ARGS_PLUS_ONE("whatis", args); }
793
794    /**
795     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code whereis}</B>
796     *
797     * <DIV CLASS="SHELL">{@code
798     * $ whereis <args[0]> <args[1]> ... <args[args.length-1]>
799     * }</DIV>
800     * @param args Any set of switches and/or arguments to this BASH command.
801     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
802     * @throws IOException If there are problems while invoking the operating-system command
803     */
804    public static OSResponse WHEREIS(String... args) throws IOException
805    { return ARGS_PLUS_ONE("whereis", args); }
806
807    /**
808     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code vmstat}</B>
809     *
810     * <DIV CLASS="SHELL">{@code
811     * $ vmstat <args[0]> <args[1]> ... <args[args.length-1]>
812     * }</DIV>
813     * @param args Any set of switches and/or arguments to this BASH command.
814     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
815     * @throws IOException If there are problems while invoking the operating-system command
816     */
817    public static OSResponse VMSTAT(String... args) throws IOException
818    { return ARGS_PLUS_ONE("vmstat", args); }
819
820    /**
821     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code ps}</B>
822     *
823     * <DIV CLASS="SHELL">{@code
824     * $ ps <args[0]> <args[1]> ... <args[args.length-1]>
825     * }</DIV>
826     * @param args Any set of switches and/or arguments to this BASH command.
827     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
828     * @throws IOException If there are problems while invoking the operating-system command
829     */
830    public static OSResponse PS(String... args) throws IOException
831    { return ARGS_PLUS_ONE("ps", args); }
832
833    /**
834     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code diff}</B>
835     *
836     * <DIV CLASS="SHELL">{@code
837     * $ diff <args[0]> <args[1]> ... <args[args.length-1]>
838     * }</DIV>
839     * @param args Any set of switches and/or arguments to this BASH command.
840     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
841     * @throws IOException If there are problems while invoking the operating-system command
842     */
843    public static OSResponse DIFF(String... args) throws IOException
844    { return ARGS_PLUS_ONE("diff", args); }
845
846    /**
847     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code cmp}</B>
848     *
849     * <DIV CLASS="SHELL">{@code
850     * $ cmp <args[0]> <args[1]> ... <args[args.length-1]>
851     * }</DIV>
852     * @param args Any set of switches and/or arguments to this BASH command.
853     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
854     * @throws IOException If there are problems while invoking the operating-system command
855     */
856    public static OSResponse CMP(String... args) throws IOException
857    { return ARGS_PLUS_ONE("CMP", args); }
858
859    /**
860     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code free}</B>
861     *
862     * <DIV CLASS="SHELL">{@code
863     * $ free <args[0]> <args[1]> ... <args[args.length-1]>
864     * }</DIV>
865     * @param args Any set of switches and/or arguments to this BASH command.
866     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
867     * @throws IOException If there are problems while invoking the operating-system command
868     */
869    public static OSResponse FREE(String... args) throws IOException
870    { return ARGS_PLUS_ONE("free", args); }
871
872    /**
873     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code chown}</B>
874     *
875     * <DIV CLASS="SHELL">{@code
876     * $ chown <args[0]> <args[1]> ... <args[args.length-1]>
877     * }</DIV>
878     * @param args Any set of switches and/or arguments to this BASH command.
879     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
880     * @throws IOException If there are problems while invoking the operating-system command
881     */
882    public static OSResponse CHOWN(String... args) throws IOException
883    { return ARGS_PLUS_ONE("chown", args); }
884
885    /**
886     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code chmod}</B>
887     *
888     * <DIV CLASS="SHELL">{@code
889     * $ chmod <args[0]> <args[1]> ... <args[args.length-1]>
890     * }</DIV>
891     * @param args Any set of switches and/or arguments to this BASH command.
892     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
893     * @throws IOException If there are problems while invoking the operating-system command
894     */
895    public static OSResponse CHMOD(String... args) throws IOException
896    { return ARGS_PLUS_ONE("chmod", args); }
897
898    /**
899     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code unzip}</B>
900     *
901     * <DIV CLASS="SHELL">{@code
902     * $ unzip <args[0]> <args[1]> ... <args[args.length-1]>
903     * }</DIV>
904     * @param args Any set of switches and/or arguments to this BASH command.
905     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
906     * @throws IOException If there are problems while invoking the operating-system command
907     */
908    public static OSResponse UNZIP(String... args) throws IOException
909    { return ARGS_PLUS_ONE("unzip", args); }
910
911    /**
912     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code gzip}</B>
913     *
914     * <DIV CLASS="SHELL">{@code
915     * $ gzip <args[0]> <args[1]> ... <args[args.length-1]>
916     * }</DIV>
917     * @param args Any set of switches and/or arguments to this BASH command.
918     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
919     * @throws IOException If there are problems while invoking the operating-system command
920     */
921    public static OSResponse GZIP(String... args) throws IOException
922    { return ARGS_PLUS_ONE("gzip", args); }
923
924    /**
925     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code sort}</B>
926     *
927     * <DIV CLASS="SHELL">{@code
928     * $ sort <args[0]> <args[1]> ... <args[args.length-1]>
929     * }</DIV>
930     * @param args Any set of switches and/or arguments to this BASH command.
931     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
932     * @throws IOException If there are problems while invoking the operating-system command
933     */
934    public static OSResponse SORT(String... args) throws IOException
935    { return ARGS_PLUS_ONE("sort", args); }
936
937    /**
938     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code javac}</B>
939     *
940     * <DIV CLASS="SHELL">{@code
941     * $ javac <args[0]> <args[1]> ... <args[args.length-1]>
942     * }</DIV>
943     * @param args Any set of switches and/or arguments to this BASH command.
944     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
945     * @throws IOException If there are problems while invoking the operating-system command
946     */
947    public static OSResponse JAVAC(String... args) throws IOException
948    { return ARGS_PLUS_ONE("javac", args); }
949
950    /**
951     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code javadoc}</B>
952     *
953     * <DIV CLASS="SHELL">{@code
954     * $ javadoc <args[0]> <args[1]> ... <args[args.length-1]>
955     * }</DIV>
956     * @param args Any set of switches and/or arguments to this BASH command.
957     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
958     * @throws IOException If there are problems while invoking the operating-system command
959     */
960    public static OSResponse JAVADOC(String... args) throws IOException
961    { return ARGS_PLUS_ONE("javadoc", args); }
962
963    /**
964     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code java}</B>
965     *
966     * <DIV CLASS="SHELL">{@code
967     * $ java <args[0]> <args[1]> ... <args[args.length-1]>
968     * }</DIV>
969     * @param args Any set of switches and/or arguments to this BASH command.
970     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
971     * @throws IOException If there are problems while invoking the operating-system command
972     */
973    public static OSResponse JAVA(String... args) throws IOException
974    { return ARGS_PLUS_ONE("java", args); }
975
976    /**
977     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code time}</B>
978     *
979     * <DIV CLASS="SHELL">{@code
980     * $ time <args[0]> <args[1]> ... <args[args.length-1]>
981     * }</DIV>
982     * @param args Any set of switches and/or arguments to this BASH command.
983     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
984     * @throws IOException If there are problems while invoking the operating-system command
985     */
986    public static OSResponse TIME(String... args) throws IOException
987    { return ARGS_PLUS_ONE("java", args); }
988
989    /**
990     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code date}</B>
991     *
992     * <DIV CLASS="SHELL">{@code
993     * $ date <args[0]> <args[1]> ... <args[args.length-1]>
994     * }</DIV>
995     * @param args Any set of switches and/or arguments to this BASH command.
996     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
997     * @throws IOException If there are problems while invoking the operating-system command
998     */
999    public static OSResponse DATE(String... args) throws IOException
1000    { return ARGS_PLUS_ONE("java", args); }
1001
1002    /**
1003     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code traceroute}</B>
1004     *
1005     * <DIV CLASS="SHELL">{@code
1006     * $ traceroute <args[0]> <args[1]> ... <args[args.length-1]>
1007     * }</DIV>
1008     * @param args Any set of switches and/or arguments to this BASH command.
1009     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
1010     * @throws IOException If there are problems while invoking the operating-system command
1011     */
1012    public static OSResponse TRACEROUTE(String... args) throws IOException
1013    { return ARGS_PLUS_ONE("traceroute", args); }
1014
1015    /**
1016     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code fsck}</B>
1017     *
1018     * <DIV CLASS="SHELL">{@code
1019     * $ fsck <args[0]> <args[1]> ... <args[args.length-1]>
1020     * }</DIV>
1021     * @param args Any set of switches and/or arguments to this BASH command.
1022     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
1023     * @throws IOException If there are problems while invoking the operating-system command
1024     */
1025    public static OSResponse FSCK(String... args) throws IOException
1026    { return ARGS_PLUS_ONE("fsck", args); }
1027
1028    /**
1029     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code nslookup}</B>
1030     *
1031     * <DIV CLASS="SHELL">{@code
1032     * $ nslookup <args[0]> <args[1]> ... <args[args.length-1]>
1033     * }</DIV>
1034     * @param args Any set of switches and/or arguments to this BASH command.
1035     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
1036     * @throws IOException If there are problems while invoking the operating-system command
1037     */
1038    public static OSResponse NSLOOKUP(String... args) throws IOException
1039    { return ARGS_PLUS_ONE("nslookup", args); }
1040
1041    /**
1042     * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code ping}</B>
1043     *
1044     * <DIV CLASS="SHELL">{@code
1045     * $ ping <args[0]> <args[1]> ... <args[args.length-1]>
1046     * }</DIV>
1047     * @param args Any set of switches and/or arguments to this BASH command.
1048     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
1049     * @throws IOException If there are problems while invoking the operating-system command
1050     */
1051    public static OSResponse PING(String... args) throws IOException
1052    { return ARGS_PLUS_ONE("ping", args); }
1053
1054    /**
1055     * Runs the {@code UNIX / BASH / LINUX 'shell'} command named by the input parameter
1056     * {@code COMMAND_NAME}.
1057     *
1058     * <DIV CLASS="SHELL">{@code
1059     * $ COMMAND_NAME <args[0]> <args[1]> ... <args[args.length-1]>
1060     * }</DIV>
1061     * 
1062     * <EMBED CLASS='external-html' DATA-FILE-ID=SH_COMMAND>
1063     *
1064     * @param COMMAND_NAME This is the name of any UNIX command not already listed inside this
1065     * class.
1066     * @param args Any set of switches and/or arguments to this BASH command.
1067     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
1068     * @throws IOException If there are problems while invoking the operating-system command
1069     */
1070    public static OSResponse COMMAND(String COMMAND_NAME, String... args) throws IOException
1071    { return ARGS_PLUS_ONE(COMMAND_NAME, args); }
1072
1073    /**
1074     * This just appends the UNIX/BASH Shell command to the beginning of the String[] (String...) of arguments,
1075     * and the calls the execution of the comamnd.
1076     * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRET'>
1077     * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(String[], Appendable)
1078     * @throws IOException If there are problems while invoking the operating-system command
1079     */
1080    private static OSResponse ARGS_PLUS_ONE(String command, String... args)
1081        throws IOException 
1082    {
1083        String[] argsPlus1 = new String[args.length + 1];
1084        argsPlus1[0] = command;
1085
1086        for (int i=0; i < args.length; i++) argsPlus1[1 + i] = args[i];
1087
1088        OSResponse.PRINT_CMD(argsPlus1, appendable);
1089
1090        return OSResponse.RUN_CMD_PRINT_OUTPUT
1091            (argsPlus1, cmdOrCmdAndOutput ? NOPRINT.np : appendable);
1092    }
1093
1094    /**
1095     * Provides the same methods as class <CODE>Shell</CODE>, but allows a user to specify many of
1096     * the additional odds and ends provided by Java's <CODE>Process</CODE> such as I/O pipes and
1097     * I/O redirects.
1098     * 
1099     * <BR /><BR />
1100     * <EMBED CLASS="external-html" DATA-FILE-ID="SHELL_XL">
1101     * <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_COMMAND">
1102     * <EMBED CLASS="external-html" DATA-FILE-ID="OS_WILD_CARD">
1103     * <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_WC">
1104     * <EMBED CLASS="external-html" DATA-FILE-ID="WORA">
1105     * @see Shell
1106     * @see OSResponse
1107     * @see OSResponse#stdOut
1108     * @see OSResponse#stdErr
1109     * @see OSResponse#response
1110     * @see FileNode
1111     */
1112    @StaticFunctional
1113    public static class XL
1114    {
1115        private XL() { }
1116
1117        /**
1118         * UNIX Shell Command: {@code Copy}
1119         * <DIV CLASS="SHELL">{@code
1120         * $ set <environmentVariables>
1121         * $ cd <currentWorkingDirectory>
1122         * $ <input-redirect> | cp <src> <target> | <output-redirect>
1123         * }</DIV>
1124         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1125         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1126         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1127         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1128         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1129         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1130         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1131         * @param src UNIX/Linux/BASH-Shell {@code 'cp'} command's "source" argument
1132         * @param target The {@code 'cp'} command "target" argument
1133         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1134         * @see Shell#CP(String, String)
1135         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1136         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1137         * @throws IOException If there are problems while invoking the operating-system command
1138         */
1139        public static OSResponse CP(
1140                File                            currentWorkingDirectory,
1141                boolean                         mergeStdErrorAndStdOut,
1142                ProcessBuilder.Redirect         outputRedirect,
1143                ProcessBuilder.Redirect         inputRedirect,
1144                ProcessBuilder.Redirect         errorRedirect,
1145                Consumer<Map<String, String>>   environmentVariableUpdater,
1146                String                          src,
1147                String                          target
1148            ) throws IOException
1149        {
1150            String[] command = { "cp", src, target };
1151
1152            OSResponse.PRINT_CMD(command, appendable);
1153
1154            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1155                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1156                errorRedirect, environmentVariableUpdater, command,
1157                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1158            );
1159        }
1160
1161        /**
1162         * UNIX Shell Command: {@code Copy}
1163         * <DIV CLASS="SHELL">{@code
1164         * $ set <environmentVariables>
1165         * $ cd <currentWorkingDirectory>
1166         * $ <input-redirect> | cp <src.elementAt(0)> <src.elementAt(1)> ... <src.elementAt(src.size()-1)> <target> | <output-redirect>
1167         * }</DIV>
1168         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1169         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1170         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1171         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1172         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1173         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1174         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1175         * @param src This may be a list of files to be copied to a target directory
1176         * @param target This is the target directory for the files listed.
1177         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1178         * @see Shell#CP(Vector, String)
1179         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1180         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1181         * @throws IOException If there are problems while invoking the operating-system command
1182         */
1183        public static OSResponse CP(
1184                File                            currentWorkingDirectory,
1185                boolean                         mergeStdErrorAndStdOut,
1186                ProcessBuilder.Redirect         outputRedirect,
1187                ProcessBuilder.Redirect         inputRedirect,
1188                ProcessBuilder.Redirect         errorRedirect,
1189                Consumer<Map<String, String>>   environmentVariableUpdater,
1190                Vector<String>                  src, 
1191                String                          target
1192            )
1193            throws IOException
1194        {
1195            String[] command = new String[src.size() + 2];
1196            command[0] = "cp";
1197            command[src.size() + 1] = target;
1198
1199            for (int i=0; i < src.size(); i++) command[1 + i] = src.elementAt(i);
1200
1201            OSResponse.PRINT_CMD(command, appendable);
1202
1203            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1204                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1205                errorRedirect, environmentVariableUpdater, command,
1206                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1207            );
1208        }
1209
1210        /**
1211         * UNIX Shell Command: {@code Copy}
1212         * <DIV CLASS="SHELL">{@code
1213         * $ set <environmentVariables>
1214         * $ cd <currentWorkingDirectory>
1215         * $ <input-redirect> | cp <src[0]> <src[1]> ... <src[src.length-1]> <target> | <output-redirect>
1216         * }</DIV>
1217         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1218         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1219         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1220         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1221         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1222         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1223         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1224         * @param src This may be a list of files to be copied to a target directory
1225         * @param target This is the target directory for the files listed.
1226         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1227         * @see Shell#CP(String[], String)
1228         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1229         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1230         * @throws IOException If there are problems while invoking the operating-system command
1231         */
1232        public static OSResponse CP(
1233                File                            currentWorkingDirectory,
1234                boolean                         mergeStdErrorAndStdOut,
1235                ProcessBuilder.Redirect         outputRedirect,
1236                ProcessBuilder.Redirect         inputRedirect,
1237                ProcessBuilder.Redirect         errorRedirect,
1238                Consumer<Map<String, String>>   environmentVariableUpdater,
1239                String[]                        src,
1240                String                          target
1241            ) throws IOException
1242        {
1243            String[] command = new String[src.length + 2];
1244            command[0] = "cp";
1245            command[src.length + 1] = target;
1246
1247            for (int i=0; i < src.length; i++) command[1 + i] = src[i];
1248
1249            OSResponse.PRINT_CMD(command, appendable);
1250
1251            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1252                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1253                errorRedirect, environmentVariableUpdater, command,
1254                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1255            );
1256        }   
1257
1258        /**
1259         * UNIX Shell Command: {@code List}
1260         * <DIV CLASS="SHELL">{@code
1261         * $ set <environmentVariables>
1262         * $ cd <currentWorkingDirectory>
1263         * $ <input-redirect> | ls <fileOrDir> | <output-redirect>
1264         * }</DIV>
1265         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1266         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1267         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1268         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1269         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1270         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1271         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1272         * @param fileOrDir This is the file <B><I>OR</I></B> directory to be searched.
1273         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1274         * @see Shell#LS(String)
1275         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1276         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1277         * @throws IOException If there are problems while invoking the operating-system command
1278         */
1279        public static OSResponse LS(
1280                File                            currentWorkingDirectory,
1281                boolean                         mergeStdErrorAndStdOut,
1282                ProcessBuilder.Redirect         outputRedirect,
1283                ProcessBuilder.Redirect         inputRedirect,
1284                ProcessBuilder.Redirect         errorRedirect,
1285                Consumer<Map<String, String>>   environmentVariableUpdater,
1286                String                          fileOrDir
1287            )
1288            throws IOException
1289        {
1290            String[] command = { "ls", fileOrDir };
1291
1292            OSResponse.PRINT_CMD(command, appendable);
1293
1294            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1295                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1296                errorRedirect, environmentVariableUpdater, command,
1297                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1298            );
1299        }
1300
1301        /**
1302         * UNIX Shell Command: {@code List}
1303         * <DIV CLASS="SHELL">{@code
1304         * $ set <environmentVariables>
1305         * $ cd <currentWorkingDirectory>
1306         * $ <input-redirect> | ls <switches> <fileOrDir> | <output-redirect>
1307         * }</DIV>
1308         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1309         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1310         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1311         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1312         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1313         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1314         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1315         * @param fileOrDir This is the file <B><I>OR</I></B> directory to be searched.
1316         * @param switches These are switches that are added to the command.
1317         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1318         * @see Shell#CP(String, String)
1319         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1320         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1321         * @throws IOException If there are problems while invoking the operating-system command
1322         */
1323        public static OSResponse LS(
1324                File                            currentWorkingDirectory,
1325                boolean                         mergeStdErrorAndStdOut,
1326                ProcessBuilder.Redirect         outputRedirect,
1327                ProcessBuilder.Redirect         inputRedirect,
1328                ProcessBuilder.Redirect         errorRedirect,
1329                Consumer<Map<String, String>>   environmentVariableUpdater,
1330                String                          fileOrDir,
1331                String                          switches
1332            )
1333            throws IOException
1334        {
1335            String[] command = { "ls", switches, fileOrDir };
1336
1337            OSResponse.PRINT_CMD(command, appendable);
1338
1339            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1340                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1341                errorRedirect, environmentVariableUpdater, command,
1342                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1343            );
1344        }
1345
1346        /**
1347         * UNIX Shell Command: {@code Move}
1348         * <DIV CLASS="SHELL">{@code
1349         * $ set <environmentVariables>
1350         * $ cd <currentWorkingDirectory>
1351         * $ <input-redirect> | mv <src> <target> | <output-redirect>
1352         * }</DIV>
1353         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1354         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1355         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1356         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1357         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1358         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1359         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1360         * @param src The first {@code String} in a typical UNIX {@code 'move'} command. It is the
1361         * "source file"
1362         * @param target The second {@code String} for a "move."  This is the destination or target.
1363         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1364         * @see Shell#MV(String, String)
1365         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1366         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1367         * @throws IOException If there are problems while invoking the operating-system command
1368         */
1369        public static OSResponse MV(
1370                File                            currentWorkingDirectory,
1371                boolean                         mergeStdErrorAndStdOut,
1372                ProcessBuilder.Redirect         outputRedirect,
1373                ProcessBuilder.Redirect         inputRedirect,
1374                ProcessBuilder.Redirect         errorRedirect,
1375                Consumer<Map<String, String>>   environmentVariableUpdater,
1376                String                          src,
1377                String                          target
1378            ) 
1379            throws IOException
1380        {
1381            String[] command = { "mv", src, target };
1382
1383            OSResponse.PRINT_CMD(command, appendable);
1384
1385            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1386                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1387                errorRedirect, environmentVariableUpdater, command,
1388                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1389            );
1390        }
1391
1392        /**
1393         * UNIX Shell Command: {@code Move}
1394         * <DIV CLASS="SHELL">{@code
1395         * $ set <environmentVariables>
1396         * $ cd <currentWorkingDirectory>
1397         * $ <input-redirect> | mv <src.elementAt(0)> <src.elementAt(1)> ... <src.elementAt(src.size()-1)> <target> | <output-redirect>
1398         * }</DIV>
1399         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1400         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1401         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1402         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1403         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1404         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1405         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1406         * @param src The first {@code String} in a typical UNIX {@code 'move'} command.
1407         * It is the "source file" - In this method, it is a list of files and expressions saved as a
1408         * {@code Vector}.
1409         * @param target The second {@code String} for a {@code 'move'} UNIX command, and it is the
1410         * target destination of the source-file.
1411         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1412         * @see Shell#MV(Vector, String)
1413         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1414         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1415         * @throws IOException If there are problems while invoking the operating-system command
1416         */
1417        public static OSResponse MV(
1418                File                            currentWorkingDirectory,
1419                boolean                         mergeStdErrorAndStdOut,
1420                ProcessBuilder.Redirect         outputRedirect,
1421                ProcessBuilder.Redirect         inputRedirect,
1422                ProcessBuilder.Redirect         errorRedirect,
1423                Consumer<Map<String, String>>   environmentVariableUpdater,
1424                Vector<String>                  src,
1425                String                          target
1426            )
1427            throws IOException
1428        {
1429            String[] command = new String[src.size() + 2];
1430            command[0] = "mv";
1431            command[src.size() + 1] = target;
1432
1433            for (int i=0; i < src.size(); i++) command[1 + i] = src.elementAt(i);
1434
1435            OSResponse.PRINT_CMD(command, appendable);
1436
1437            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1438                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1439                errorRedirect, environmentVariableUpdater, command,
1440                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1441            );
1442        }
1443
1444        /**
1445         * UNIX Shell Command: {@code Move}
1446         * <DIV CLASS="SHELL">{@code
1447         * $ set <environmentVariables>
1448         * $ cd <currentWorkingDirectory>
1449         * $ <input-redirect> | mv <src[0]> <src[1]> ... <src[src.length-1]> <target> | <output-redirect>
1450         * }</DIV>
1451         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1452         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1453         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1454         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1455         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1456         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1457         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1458         * @param src The first {@code String} in a typical UNIX {@code 'move'} command.
1459         * It is the "source file" - In this method, it is a list of files and expressions saved as an
1460         * array.
1461         * @param target The second {@code String} for a UNIX {@code 'move'} command, and it is the
1462         * target destination
1463         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1464         * @see Shell#MV(String[], String)
1465         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1466         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1467         * @throws IOException If there are problems while invoking the operating-system command
1468         */
1469        public static OSResponse MV(
1470                File                            currentWorkingDirectory,
1471                boolean                         mergeStdErrorAndStdOut,
1472                ProcessBuilder.Redirect         outputRedirect,
1473                ProcessBuilder.Redirect         inputRedirect,
1474                ProcessBuilder.Redirect         errorRedirect,
1475                Consumer<Map<String, String>>   environmentVariableUpdater,
1476                String[]                        src,
1477                String                          target
1478            )
1479            throws IOException
1480        {
1481            String[] command = new String[src.length + 2];
1482            command[0] = "mv";
1483            command[src.length + 1] = target;
1484
1485            for (int i=0; i < src.length; i++) command[1 + i] = src[i];
1486
1487            OSResponse.PRINT_CMD(command, appendable);
1488
1489            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1490                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1491                errorRedirect, environmentVariableUpdater, command,
1492                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1493            );
1494        }
1495
1496        /**
1497         * UNIX Shell Command: {@code Remove}
1498         * <DIV CLASS="SHELL">{@code
1499         * $ set <environmentVariables>
1500         * $ cd <currentWorkingDirectory>
1501         * $ <input-redirect> | rm <s1> | <output-redirect>
1502         * }</DIV>
1503         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1504         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1505         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1506         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1507         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1508         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1509         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1510         * @param s1 The item to be removed, using a UNIX operating-system command.
1511         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1512         * @see Shell#RM(String)
1513         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1514         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1515         * @throws IOException If there are problems while invoking the operating-system command
1516         */
1517        public static OSResponse RM(
1518                File                            currentWorkingDirectory,
1519                boolean                         mergeStdErrorAndStdOut,
1520                ProcessBuilder.Redirect         outputRedirect,
1521                ProcessBuilder.Redirect         inputRedirect,
1522                ProcessBuilder.Redirect         errorRedirect,
1523                Consumer<Map<String, String>>   environmentVariableUpdater,
1524                String                          s1
1525            )
1526            throws IOException
1527        {
1528            String[] command = { "rm", s1 };
1529
1530            OSResponse.PRINT_CMD(command, appendable);
1531
1532            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1533                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1534                errorRedirect, environmentVariableUpdater, command,
1535                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1536            );
1537        }
1538
1539        /**
1540         * UNIX Shell Command: {@code Remove}
1541         * <DIV CLASS="SHELL">{@code
1542         * $ set <environmentVariables>
1543         * $ cd <currentWorkingDirectory>
1544         * $ <input-redirect> | rm <sArr[0]> <sArr[1]> ... <sArr[sArr.length-1]> | <output-redirect>
1545         * }</DIV>
1546         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1547         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1548         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1549         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1550         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1551         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1552         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1553         * @param sArr An {@code String[] array} which is added to the end of this UNIX command.
1554         * These will be the item(s) removed by the UNIX {@code 'RM'} command.
1555         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1556         * @see Shell#RM(String[])
1557         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1558         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1559         * @throws IOException If there are problems while invoking the operating-system command
1560         */
1561        public static OSResponse RM(
1562                File                            currentWorkingDirectory,
1563                boolean                         mergeStdErrorAndStdOut,
1564                ProcessBuilder.Redirect         outputRedirect,
1565                ProcessBuilder.Redirect         inputRedirect,
1566                ProcessBuilder.Redirect         errorRedirect,
1567                Consumer<Map<String, String>>   environmentVariableUpdater,
1568                String[]                        sArr
1569            )
1570            throws IOException
1571        {
1572            String[] command = new String[sArr.length + 1];
1573            command[0] = "rm";
1574            for (int i=0; i < sArr.length; i++) command[i + 1] = sArr[i];
1575
1576            OSResponse.PRINT_CMD(command, appendable);
1577
1578            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1579                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1580                errorRedirect, environmentVariableUpdater, command,
1581                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1582            );
1583        }
1584
1585        /**
1586         * UNIX Shell Command: {@code Remove}
1587         * <DIV CLASS="SHELL">{@code
1588         * $ set <environmentVariables>
1589         * $ cd <currentWorkingDirectory>
1590         * $ <input-redirect> | rm  <src.elementAt(0)> <src.elementAt(1)> ... <src.elementAt(src.size()-1)> | <output-redirect>
1591         * }</DIV>
1592         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1593         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1594         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1595         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1596         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1597         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1598         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1599         * @param v A {@code Vector<String>} that contains command-line-parameters which
1600         * are added, sequentially, to the end of this UNIX command.  The {@code String's} in
1601         * this {@code Vector} are the item(s) to be removed by the UNIX {@code 'RM'} command.
1602         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1603         * @see Shell#RM(Vector)
1604         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1605         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1606         * @throws IOException If there are problems while invoking the operating-system command
1607         */
1608        public static OSResponse RM(
1609                File                            currentWorkingDirectory,
1610                boolean                         mergeStdErrorAndStdOut,
1611                ProcessBuilder.Redirect         outputRedirect,
1612                ProcessBuilder.Redirect         inputRedirect,
1613                ProcessBuilder.Redirect         errorRedirect,
1614                Consumer<Map<String, String>>   environmentVariableUpdater,
1615                Vector<String>                  v
1616            )
1617            throws IOException
1618        {
1619            String[] command = new String[v.size() + 1];
1620            command[0] = "rm";
1621
1622            for (int i=0; i < v.size(); i++) command[i + 1] = v.elementAt(i);
1623
1624            OSResponse.PRINT_CMD(command, appendable);
1625
1626            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1627                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1628                errorRedirect, environmentVariableUpdater, command,
1629                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1630            );
1631        }
1632
1633        /**
1634         * UNIX Shell Command: {@code Remove}
1635         * <DIV CLASS="SHELL">{@code
1636         * $ set <environmentVariables>
1637         * $ cd <currentWorkingDirectory>
1638         * $ <input-redirect> | rm <switches> <s1> | <output-redirect>
1639         * }</DIV>
1640         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1641         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1642         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1643         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1644         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1645         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1646         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1647         * @param s1 A file or directory parameter passed to {@code 'RM'}
1648         * @param switches These are switches (for-instance: {@code -R}, recursive).
1649         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1650         * @see Shell#RM(String, String)
1651         * @see OSResponse#PRINT_CMD_RUN_CMD_PRINT_OUTPUT(File, boolean, ProcessBuilder.Redirect, 
1652         * ProcessBuilder.Redirect, ProcessBuilder.Redirect, Consumer, String[], Appendable)
1653         * @throws IOException If there are problems while invoking the operating-system command
1654         */
1655        public static OSResponse RM(
1656                File                            currentWorkingDirectory,
1657                boolean                         mergeStdErrorAndStdOut,
1658                ProcessBuilder.Redirect         outputRedirect,
1659                ProcessBuilder.Redirect         inputRedirect,
1660                ProcessBuilder.Redirect         errorRedirect,
1661                Consumer<Map<String, String>>   environmentVariableUpdater,
1662                String                          s1,
1663                String                          switches
1664            )
1665            throws IOException
1666        {
1667            String[] command = { "rm", switches, s1 };
1668
1669            OSResponse.PRINT_CMD(command, appendable);
1670
1671            return OSResponse.RUN_CMD_PRINT_OUTPUT(
1672                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1673                errorRedirect, environmentVariableUpdater, command,
1674                cmdOrCmdAndOutput ? NOPRINT.np : appendable
1675            );
1676        }
1677
1678        /**
1679         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code tar}</B>
1680         *
1681         * <DIV CLASS="SHELL">{@code
1682         * $ set <environmentVariables>
1683         * $ cd <currentWorkingDirectory>
1684         * $ <input-redirect> | tar <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
1685         * }</DIV>
1686         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1687         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1688         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1689         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1690         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1691         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1692         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1693         * @param args Any set of switches and/or arguments to this BASH command.
1694         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1695         * @see Shell#TAR(String[])
1696         * @throws IOException If there are problems while invoking the operating-system command
1697         */
1698        public static OSResponse TAR(
1699                File                            currentWorkingDirectory,
1700                boolean                         mergeStdErrorAndStdOut,
1701                ProcessBuilder.Redirect         outputRedirect,
1702                ProcessBuilder.Redirect         inputRedirect,
1703                ProcessBuilder.Redirect         errorRedirect,
1704                Consumer<Map<String, String>>   environmentVariableUpdater,
1705                String...                       args
1706            )
1707            throws IOException
1708        {
1709            return ARGS_PLUS_ONE(
1710                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1711                errorRedirect, environmentVariableUpdater, "tar", args
1712            );
1713        }
1714
1715        /**
1716         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code jar}</B>
1717         *
1718         * <DIV CLASS="SHELL">{@code
1719         * $ set <environmentVariables>
1720         * $ cd <currentWorkingDirectory>
1721         * $ <input-redirect> | jar <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
1722         * }</DIV>
1723         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1724         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1725         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1726         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1727         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1728         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1729         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1730         * @param args Any set of switches and/or arguments to this BASH command.
1731         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1732         * @see Shell#JAR(String[])
1733         * @throws IOException If there are problems while invoking the operating-system command
1734         */
1735        public static OSResponse JAR(
1736                File                            currentWorkingDirectory,
1737                boolean                         mergeStdErrorAndStdOut,
1738                ProcessBuilder.Redirect         outputRedirect,
1739                ProcessBuilder.Redirect         inputRedirect,
1740                ProcessBuilder.Redirect         errorRedirect,
1741                Consumer<Map<String, String>>   environmentVariableUpdater,
1742                String...                       args
1743            )
1744            throws IOException
1745        {
1746            return ARGS_PLUS_ONE(
1747                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1748                errorRedirect, environmentVariableUpdater, "jar", args
1749            );
1750        }
1751
1752        /**
1753         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code grep}</B>
1754         *
1755         * <DIV CLASS="SHELL">{@code
1756         * $ set <environmentVariables>
1757         * $ cd <currentWorkingDirectory>
1758         * $ <input-redirect> | grep <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
1759         * }</DIV>
1760         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1761         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1762         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1763         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1764         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1765         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1766         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1767         * @param args Any set of switches and/or arguments to this BASH command.
1768         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1769         * @see Shell#GREP(String[])
1770         * @throws IOException If there are problems while invoking the operating-system command
1771         */
1772        public static OSResponse GREP(
1773                File                            currentWorkingDirectory,
1774                boolean                         mergeStdErrorAndStdOut,
1775                ProcessBuilder.Redirect         outputRedirect,
1776                ProcessBuilder.Redirect         inputRedirect,
1777                ProcessBuilder.Redirect         errorRedirect,
1778                Consumer<Map<String, String>>   environmentVariableUpdater,
1779                String...                       args
1780            )
1781            throws IOException
1782        {
1783            return ARGS_PLUS_ONE(
1784                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1785                errorRedirect, environmentVariableUpdater, "grep", args
1786            );
1787        }
1788
1789        /**
1790         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code find}</B>
1791         *
1792         * <DIV CLASS="SHELL">{@code
1793         * $ set <environmentVariables>
1794         * $ cd <currentWorkingDirectory>
1795         * $ <input-redirect> | find <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
1796         * }</DIV>
1797         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1798         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1799         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1800         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1801         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1802         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1803         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1804         * @param args Any set of switches and/or arguments to this BASH command.
1805         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1806         * @see Shell#FIND(String[])
1807         * @throws IOException If there are problems while invoking the operating-system command
1808         */
1809        public static OSResponse FIND(
1810                File                            currentWorkingDirectory,
1811                boolean                         mergeStdErrorAndStdOut,
1812                ProcessBuilder.Redirect         outputRedirect,
1813                ProcessBuilder.Redirect         inputRedirect,
1814                ProcessBuilder.Redirect         errorRedirect,
1815                Consumer<Map<String, String>>   environmentVariableUpdater,
1816                String...                       args
1817            )
1818            throws IOException
1819        {
1820            return ARGS_PLUS_ONE(
1821                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1822                errorRedirect, environmentVariableUpdater, "find", args
1823            );
1824        }
1825
1826        /**
1827         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code du}</B>
1828         *
1829         * <DIV CLASS="SHELL">{@code
1830         * $ set <environmentVariables>
1831         * $ cd <currentWorkingDirectory>
1832         * $ <input-redirect> | du <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
1833         * }</DIV>
1834         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1835         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1836         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1837         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1838         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1839         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1840         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1841         * @param args Any set of switches and/or arguments to this BASH command.
1842         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1843         * @see Shell#DU(String[])
1844         * @throws IOException If there are problems while invoking the operating-system command
1845         */
1846        public static OSResponse DU(
1847                File                            currentWorkingDirectory,
1848                boolean                         mergeStdErrorAndStdOut,
1849                ProcessBuilder.Redirect         outputRedirect,
1850                ProcessBuilder.Redirect         inputRedirect,
1851                ProcessBuilder.Redirect         errorRedirect,
1852                Consumer<Map<String, String>>   environmentVariableUpdater,
1853                String...                       args
1854            )
1855            throws IOException
1856        {
1857            return ARGS_PLUS_ONE(
1858                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1859                errorRedirect, environmentVariableUpdater, "du", args
1860            );
1861        }
1862
1863        /**
1864         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code df}</B>
1865         *
1866         * <DIV CLASS="SHELL">{@code
1867         * $ set <environmentVariables>
1868         * $ cd <currentWorkingDirectory>
1869         * $ <input-redirect> | df <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
1870         * }</DIV>
1871         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1872         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1873         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1874         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1875         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1876         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1877         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1878         * @param args Any set of switches and/or arguments to this BASH command.
1879         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1880         * @see Shell#DF(String[])
1881         * @throws IOException If there are problems while invoking the operating-system command
1882         */
1883        public static OSResponse DF(
1884                File                            currentWorkingDirectory,
1885                boolean                         mergeStdErrorAndStdOut,
1886                ProcessBuilder.Redirect         outputRedirect,
1887                ProcessBuilder.Redirect         inputRedirect,
1888                ProcessBuilder.Redirect         errorRedirect,
1889                Consumer<Map<String, String>>   environmentVariableUpdater,
1890                String...                       args
1891            )
1892            throws IOException
1893        {
1894            return ARGS_PLUS_ONE(
1895                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1896                errorRedirect, environmentVariableUpdater, "df", args
1897            );
1898        }
1899
1900        /**
1901         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code sed}</B>
1902         *
1903         * <DIV CLASS="SHELL">{@code
1904         * $ set <environmentVariables>
1905         * $ cd <currentWorkingDirectory>
1906         * $ <input-redirect> | sed <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
1907         * }</DIV>
1908         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1909         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1910         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1911         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1912         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1913         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1914         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1915         * @param args Any set of switches and/or arguments to this BASH command.
1916         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1917         * @see Shell#SED(String[])
1918         * @throws IOException If there are problems while invoking the operating-system command
1919         */
1920        public static OSResponse SED(
1921                File                            currentWorkingDirectory,
1922                boolean                         mergeStdErrorAndStdOut,
1923                ProcessBuilder.Redirect         outputRedirect,
1924                ProcessBuilder.Redirect         inputRedirect,
1925                ProcessBuilder.Redirect         errorRedirect,
1926                Consumer<Map<String, String>>   environmentVariableUpdater,
1927                String...                       args
1928            )
1929            throws IOException
1930        {
1931            return ARGS_PLUS_ONE(
1932                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1933                errorRedirect, environmentVariableUpdater, "sed", args
1934            );
1935        }
1936
1937        /**
1938         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code whatis}</B>
1939         *
1940         * <DIV CLASS="SHELL">{@code
1941         * $ set <environmentVariables>
1942         * $ cd <currentWorkingDirectory>
1943         * $ <input-redirect> | whatis <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
1944         * }</DIV>
1945         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1946         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1947         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1948         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1949         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1950         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1951         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1952         * @param args Any set of switches and/or arguments to this BASH command.
1953         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1954         * @see Shell#WHATIS(String[])
1955         * @throws IOException If there are problems while invoking the operating-system command
1956         */
1957        public static OSResponse WHATIS(
1958                File                            currentWorkingDirectory,
1959                boolean                         mergeStdErrorAndStdOut,
1960                ProcessBuilder.Redirect         outputRedirect,
1961                ProcessBuilder.Redirect         inputRedirect,
1962                ProcessBuilder.Redirect         errorRedirect,
1963                Consumer<Map<String, String>>   environmentVariableUpdater,
1964                String...                       args
1965            )
1966            throws IOException
1967        {
1968            return ARGS_PLUS_ONE(
1969                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
1970                errorRedirect, environmentVariableUpdater, "whatis", args
1971            );
1972        }
1973
1974        /**
1975         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code whereis}</B>
1976         *
1977         * <DIV CLASS="SHELL">{@code
1978         * $ set <environmentVariables>
1979         * $ cd <currentWorkingDirectory>
1980         * $ <input-redirect> | whereis <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
1981         * }</DIV>
1982         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
1983         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
1984         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
1985         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
1986         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
1987         * @param environmentVariableUpdater <EMBED CLASS="external-html"
1988         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
1989         * @param args Any set of switches and/or arguments to this BASH command.
1990         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
1991         * @see Shell#WHEREIS(String[])
1992         * @throws IOException If there are problems while invoking the operating-system command
1993         */
1994        public static OSResponse WHEREIS(
1995                File                            currentWorkingDirectory,
1996                boolean                         mergeStdErrorAndStdOut,
1997                ProcessBuilder.Redirect         outputRedirect,
1998                ProcessBuilder.Redirect         inputRedirect,
1999                ProcessBuilder.Redirect         errorRedirect,
2000                Consumer<Map<String, String>>   environmentVariableUpdater,
2001                String...                       args
2002            )
2003            throws IOException
2004        {
2005            return ARGS_PLUS_ONE(
2006                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2007                errorRedirect, environmentVariableUpdater, "whereis", args
2008            );
2009        }
2010
2011        /**
2012         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code vmstat}</B>
2013         *
2014         * <DIV CLASS="SHELL">{@code
2015         * $ set <environmentVariables>
2016         * $ cd <currentWorkingDirectory>
2017         * $ <input-redirect> | vmstat <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2018         * }</DIV>
2019         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2020         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2021         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2022         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2023         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2024         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2025         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2026         * @param args Any set of switches and/or arguments to this BASH command.
2027         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2028         * @see Shell#VMSTAT(String[])
2029         * @throws IOException If there are problems while invoking the operating-system command
2030         */
2031        public static OSResponse VMSTAT(
2032                File                            currentWorkingDirectory,
2033                boolean                         mergeStdErrorAndStdOut,
2034                ProcessBuilder.Redirect         outputRedirect,
2035                ProcessBuilder.Redirect         inputRedirect,
2036                ProcessBuilder.Redirect         errorRedirect,
2037                Consumer<Map<String, String>>   environmentVariableUpdater,
2038                String...                       args
2039            )
2040            throws IOException
2041        {
2042            return ARGS_PLUS_ONE(
2043                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2044                errorRedirect, environmentVariableUpdater, "vmstat", args
2045            );
2046        }
2047
2048        /**
2049         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code ps}</B>
2050         *
2051         * <DIV CLASS="SHELL">{@code
2052         * $ set <environmentVariables>
2053         * $ cd <currentWorkingDirectory>
2054         * $ <input-redirect> | ps <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2055         * }</DIV>
2056         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2057         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2058         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2059         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2060         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2061         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2062         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2063         * @param args Any set of switches and/or arguments to this BASH command.
2064         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2065         * @see Shell#PS(String[])
2066         * @throws IOException If there are problems while invoking the operating-system command
2067         */
2068        public static OSResponse PS(
2069                File                            currentWorkingDirectory,
2070                boolean                         mergeStdErrorAndStdOut,
2071                ProcessBuilder.Redirect         outputRedirect,
2072                ProcessBuilder.Redirect         inputRedirect,
2073                ProcessBuilder.Redirect         errorRedirect,
2074                Consumer<Map<String, String>>   environmentVariableUpdater,
2075                String...                       args
2076            )
2077            throws IOException
2078        {
2079            return ARGS_PLUS_ONE(
2080                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2081                errorRedirect, environmentVariableUpdater, "ps", args
2082            );
2083        }
2084
2085        /**
2086         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code diff}</B>
2087         *
2088         * <DIV CLASS="SHELL">{@code
2089         * $ set <environmentVariables>
2090         * $ cd <currentWorkingDirectory>
2091         * $ <input-redirect> | diff <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2092         * }</DIV>
2093         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2094         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2095         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2096         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2097         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2098         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2099         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2100         * @param args Any set of switches and/or arguments to this BASH command.
2101         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2102         * @see Shell#DIFF(String[])
2103         * @throws IOException If there are problems while invoking the operating-system command
2104         */
2105        public static OSResponse DIFF(
2106                File                            currentWorkingDirectory,
2107                boolean                         mergeStdErrorAndStdOut,
2108                ProcessBuilder.Redirect         outputRedirect,
2109                ProcessBuilder.Redirect         inputRedirect,
2110                ProcessBuilder.Redirect         errorRedirect,
2111                Consumer<Map<String, String>>   environmentVariableUpdater,
2112                String...                       args
2113            )
2114            throws IOException
2115        {
2116            return ARGS_PLUS_ONE(
2117                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2118                errorRedirect, environmentVariableUpdater, "diff", args
2119            );
2120        }
2121
2122        /**
2123         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code cmp}</B>
2124         *
2125         * <DIV CLASS="SHELL">{@code
2126         * $ set <environmentVariables>
2127         * $ cd <currentWorkingDirectory>
2128         * $ <input-redirect> | cmp <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2129         * }</DIV>
2130         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2131         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2132         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2133         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2134         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2135         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2136         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2137         * @param args Any set of switches and/or arguments to this BASH command.
2138         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2139         * @see Shell#CMP(String[])
2140         * @throws IOException If there are problems while invoking the operating-system command
2141         */
2142        public static OSResponse CMP(
2143                File                            currentWorkingDirectory,
2144                boolean                         mergeStdErrorAndStdOut,
2145                ProcessBuilder.Redirect         outputRedirect,
2146                ProcessBuilder.Redirect         inputRedirect,
2147                ProcessBuilder.Redirect         errorRedirect,
2148                Consumer<Map<String, String>>   environmentVariableUpdater,
2149                String...                       args
2150            )
2151            throws IOException
2152        {
2153            return ARGS_PLUS_ONE(
2154                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2155                errorRedirect, environmentVariableUpdater, "CMP", args
2156            );
2157        }
2158
2159        /**
2160         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code free}</B>
2161         *
2162         * <DIV CLASS="SHELL">{@code
2163         * $ set <environmentVariables>
2164         * $ cd <currentWorkingDirectory>
2165         * $ <input-redirect> | free <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2166         * }</DIV>
2167         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2168         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2169         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2170         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2171         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2172         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2173         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2174         * @param args Any set of switches and/or arguments to this BASH command.
2175         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2176         * @see Shell#FREE(String[])
2177         * @throws IOException If there are problems while invoking the operating-system command
2178         */
2179        public static OSResponse FREE(
2180                File                            currentWorkingDirectory,
2181                boolean                         mergeStdErrorAndStdOut,
2182                ProcessBuilder.Redirect         outputRedirect,
2183                ProcessBuilder.Redirect         inputRedirect,
2184                ProcessBuilder.Redirect         errorRedirect,
2185                Consumer<Map<String, String>>   environmentVariableUpdater,
2186                String...                       args
2187            )
2188            throws IOException
2189        {
2190            return ARGS_PLUS_ONE(
2191                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2192                errorRedirect, environmentVariableUpdater, "free", args
2193            );
2194        }
2195
2196        /**
2197         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code chown}</B>
2198         *
2199         * <DIV CLASS="SHELL">{@code
2200         * $ set <environmentVariables>
2201         * $ cd <currentWorkingDirectory>
2202         * $ <input-redirect> | chown <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2203         * }</DIV>
2204         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2205         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2206         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2207         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2208         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2209         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2210         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2211         * @param args Any set of switches and/or arguments to this BASH command.
2212         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2213         * @see Shell#CHOWN(String[])
2214         * @throws IOException If there are problems while invoking the operating-system command
2215         */
2216        public static OSResponse CHOWN(
2217                File                            currentWorkingDirectory,
2218                boolean                         mergeStdErrorAndStdOut,
2219                ProcessBuilder.Redirect         outputRedirect,
2220                ProcessBuilder.Redirect         inputRedirect,
2221                ProcessBuilder.Redirect         errorRedirect,
2222                Consumer<Map<String, String>>   environmentVariableUpdater,
2223                String...                       args
2224            )
2225            throws IOException
2226        {
2227            return ARGS_PLUS_ONE(
2228                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2229                errorRedirect, environmentVariableUpdater, "chown", args
2230            );
2231        }
2232
2233        /**
2234         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code chmod}</B>
2235         *
2236         * <DIV CLASS="SHELL">{@code
2237         * $ set <environmentVariables>
2238         * $ cd <currentWorkingDirectory>
2239         * $ <input-redirect> | chmod <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2240         * }</DIV>
2241         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2242         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2243         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2244         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2245         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2246         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2247         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2248         * @param args Any set of switches and/or arguments to this BASH command.
2249         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2250         * @see Shell#CHMOD(String[])
2251         * @throws IOException If there are problems while invoking the operating-system command
2252         */
2253        public static OSResponse CHMOD(
2254                File                            currentWorkingDirectory,
2255                boolean                         mergeStdErrorAndStdOut,
2256                ProcessBuilder.Redirect         outputRedirect,
2257                ProcessBuilder.Redirect         inputRedirect,
2258                ProcessBuilder.Redirect         errorRedirect,
2259                Consumer<Map<String, String>>   environmentVariableUpdater,
2260                String...                       args
2261            )
2262            throws IOException
2263        {
2264            return ARGS_PLUS_ONE(
2265                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2266                errorRedirect, environmentVariableUpdater, "chmod", args
2267            );
2268        }
2269
2270        /**
2271         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code unzip}</B>
2272         *
2273         * <DIV CLASS="SHELL">{@code
2274         * $ set <environmentVariables>
2275         * $ cd <currentWorkingDirectory>
2276         * $ <input-redirect> | unzip <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2277         * }</DIV>
2278         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2279         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2280         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2281         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2282         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2283         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2284         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2285         * @param args Any set of switches and/or arguments to this BASH command.
2286         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2287         * @see Shell#UNZIP(String[])
2288         * @throws IOException If there are problems while invoking the operating-system command
2289         */
2290        public static OSResponse UNZIP(
2291                File                            currentWorkingDirectory,
2292                boolean                         mergeStdErrorAndStdOut,
2293                ProcessBuilder.Redirect         outputRedirect,
2294                ProcessBuilder.Redirect         inputRedirect,
2295                ProcessBuilder.Redirect         errorRedirect,
2296                Consumer<Map<String, String>>   environmentVariableUpdater,
2297                String...                       args
2298            )
2299            throws IOException
2300        {
2301            return ARGS_PLUS_ONE(
2302                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2303                errorRedirect, environmentVariableUpdater, "unzip", args
2304            );
2305        }
2306
2307        /**
2308         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code gzip}</B>
2309         *
2310         * <DIV CLASS="SHELL">{@code
2311         * $ set <environmentVariables>
2312         * $ cd <currentWorkingDirectory>
2313         * $ <input-redirect> | gzip <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2314         * }</DIV>
2315         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2316         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2317         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2318         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2319         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2320         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2321         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2322         * @param args Any set of switches and/or arguments to this BASH command.
2323         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2324         * @see Shell#GZIP(String[])
2325         * @throws IOException If there are problems while invoking the operating-system command
2326         */
2327        public static OSResponse GZIP(
2328                File                            currentWorkingDirectory,
2329                boolean                         mergeStdErrorAndStdOut,
2330                ProcessBuilder.Redirect         outputRedirect,
2331                ProcessBuilder.Redirect         inputRedirect,
2332                ProcessBuilder.Redirect         errorRedirect,
2333                Consumer<Map<String, String>>   environmentVariableUpdater,
2334                String...                       args
2335            )
2336            throws IOException
2337        {
2338            return ARGS_PLUS_ONE(
2339                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2340                errorRedirect, environmentVariableUpdater, "gzip", args
2341            );
2342        }
2343
2344        /**
2345         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code sort}</B>
2346         *
2347         * <DIV CLASS="SHELL">{@code
2348         * $ set <environmentVariables>
2349         * $ cd <currentWorkingDirectory>
2350         * $ <input-redirect> | sort <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2351         * }</DIV>
2352         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2353         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2354         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2355         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2356         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2357         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2358         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2359         * @param args Any set of switches and/or arguments to this BASH command.
2360         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2361         * @see Shell#SORT(String[])
2362         * @throws IOException If there are problems while invoking the operating-system command
2363         */
2364        public static OSResponse SORT(
2365                File                            currentWorkingDirectory,
2366                boolean                         mergeStdErrorAndStdOut,
2367                ProcessBuilder.Redirect         outputRedirect,
2368                ProcessBuilder.Redirect         inputRedirect,
2369                ProcessBuilder.Redirect         errorRedirect,
2370                Consumer<Map<String, String>>   environmentVariableUpdater,
2371                String...                       args
2372            )
2373            throws IOException
2374        {
2375            return ARGS_PLUS_ONE(
2376                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2377                errorRedirect, environmentVariableUpdater, "sort", args
2378            );
2379        }
2380
2381        /**
2382         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code javac}</B>
2383         *
2384         * <DIV CLASS="SHELL">{@code
2385         * $ set <environmentVariables>
2386         * $ cd <currentWorkingDirectory>
2387         * $ <input-redirect> | javac <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2388         * }</DIV>
2389         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2390         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2391         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2392         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2393         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2394         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2395         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2396         * @param args Any set of switches and/or arguments to this BASH command.
2397         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2398         * @see Shell#JAVAC(String[])
2399         * @throws IOException If there are problems while invoking the operating-system command
2400         */
2401        public static OSResponse JAVAC(
2402                File                            currentWorkingDirectory,
2403                boolean                         mergeStdErrorAndStdOut,
2404                ProcessBuilder.Redirect         outputRedirect,
2405                ProcessBuilder.Redirect         inputRedirect,
2406                ProcessBuilder.Redirect         errorRedirect,
2407                Consumer<Map<String, String>>   environmentVariableUpdater,
2408                String...                       args
2409            )
2410            throws IOException
2411        {
2412            return ARGS_PLUS_ONE(
2413                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2414                errorRedirect, environmentVariableUpdater, "javac", args
2415            );
2416        }
2417
2418        /**
2419         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code javadoc}</B>
2420         *
2421         * <DIV CLASS="SHELL">{@code
2422         * $ set <environmentVariables>
2423         * $ cd <currentWorkingDirectory>
2424         * $ <input-redirect> | javadoc <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2425         * }</DIV>
2426         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2427         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2428         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2429         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2430         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2431         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2432         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2433         * @param args Any set of switches and/or arguments to this BASH command.
2434         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2435         * @see Shell#JAVADOC(String[])
2436         * @throws IOException If there are problems while invoking the operating-system command
2437         */
2438        public static OSResponse JAVADOC(
2439                File                            currentWorkingDirectory,
2440                boolean                         mergeStdErrorAndStdOut,
2441                ProcessBuilder.Redirect         outputRedirect,
2442                ProcessBuilder.Redirect         inputRedirect,
2443                ProcessBuilder.Redirect         errorRedirect,
2444                Consumer<Map<String, String>>   environmentVariableUpdater,
2445                String...                       args
2446            )
2447            throws IOException
2448        {
2449            return ARGS_PLUS_ONE(
2450                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2451                errorRedirect, environmentVariableUpdater, "javadoc", args
2452            );
2453        }
2454
2455        /**
2456         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code java}</B>
2457         *
2458         * <DIV CLASS="SHELL">{@code
2459         * $ set <environmentVariables>
2460         * $ cd <currentWorkingDirectory>
2461         * $ <input-redirect> | java <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2462         * }</DIV>
2463         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2464         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2465         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2466         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2467         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2468         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2469         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2470         * @param args Any set of switches and/or arguments to this BASH command.
2471         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2472         * @see Shell#JAVA(String[])
2473         * @throws IOException If there are problems while invoking the operating-system command
2474         */
2475        public static OSResponse JAVA(
2476                File                            currentWorkingDirectory,
2477                boolean                         mergeStdErrorAndStdOut,
2478                ProcessBuilder.Redirect         outputRedirect,
2479                ProcessBuilder.Redirect         inputRedirect,
2480                ProcessBuilder.Redirect         errorRedirect,
2481                Consumer<Map<String, String>>   environmentVariableUpdater,
2482                String...                       args
2483            )
2484            throws IOException
2485        {
2486            return ARGS_PLUS_ONE(
2487                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2488                errorRedirect, environmentVariableUpdater, "java", args
2489            );
2490        }
2491
2492        /**
2493         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code time}</B>
2494         *
2495         * <DIV CLASS="SHELL">{@code
2496         * $ set <environmentVariables>
2497         * $ cd <currentWorkingDirectory>
2498         * $ <input-redirect> | time <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2499         * }</DIV>
2500         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2501         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2502         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2503         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2504         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2505         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2506         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2507         * @param args Any set of switches and/or arguments to this BASH command.
2508         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2509         * @see Shell#TIME(String[])
2510         * @throws IOException If there are problems while invoking the operating-system command
2511         */
2512        public static OSResponse TIME(
2513                File                            currentWorkingDirectory,
2514                boolean                         mergeStdErrorAndStdOut,
2515                ProcessBuilder.Redirect         outputRedirect,
2516                ProcessBuilder.Redirect         inputRedirect,
2517                ProcessBuilder.Redirect         errorRedirect,
2518                Consumer<Map<String, String>>   environmentVariableUpdater,
2519                String...                       args
2520            )
2521            throws IOException
2522        {
2523            return ARGS_PLUS_ONE(
2524                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2525                errorRedirect, environmentVariableUpdater, "time", args
2526            );
2527        }
2528
2529        /**
2530         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code date}</B>
2531         *
2532         * <DIV CLASS="SHELL">{@code
2533         * $ set <environmentVariables>
2534         * $ cd <currentWorkingDirectory>
2535         * $ <input-redirect> | date <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2536         * }</DIV>
2537         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2538         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2539         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2540         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2541         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2542         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2543         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2544         * @param args Any set of switches and/or arguments to this BASH command.
2545         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2546         * @see Shell#DATE(String[])
2547         * @throws IOException If there are problems while invoking the operating-system command
2548         */
2549        public static OSResponse DATE(
2550                File                            currentWorkingDirectory,
2551                boolean                         mergeStdErrorAndStdOut,
2552                ProcessBuilder.Redirect         outputRedirect,
2553                ProcessBuilder.Redirect         inputRedirect,
2554                ProcessBuilder.Redirect         errorRedirect,
2555                Consumer<Map<String, String>>   environmentVariableUpdater,
2556                String...                       args
2557            )
2558            throws IOException
2559        {
2560            return ARGS_PLUS_ONE(
2561                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2562                errorRedirect, environmentVariableUpdater, "date", args
2563            );
2564        }
2565
2566        /**
2567         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code ping}</B>
2568         *
2569         * <DIV CLASS="SHELL">{@code
2570         * $ set <environmentVariables>
2571         * $ cd <currentWorkingDirectory>
2572         * $ <input-redirect> | ping <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2573         * }</DIV>
2574         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2575         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2576         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2577         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2578         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2579         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2580         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2581         * @param args Any set of switches and/or arguments to this BASH command.
2582         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2583         * @see Shell#PING(String[])
2584         * @throws IOException If there are problems while invoking the operating-system command
2585         */
2586        public static OSResponse PING(
2587                File                            currentWorkingDirectory,
2588                boolean                         mergeStdErrorAndStdOut,
2589                ProcessBuilder.Redirect         outputRedirect,
2590                ProcessBuilder.Redirect         inputRedirect,
2591                ProcessBuilder.Redirect         errorRedirect,
2592                Consumer<Map<String, String>>   environmentVariableUpdater,
2593                String...                       args
2594            )
2595            throws IOException
2596        {
2597            return ARGS_PLUS_ONE(
2598                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2599                errorRedirect, environmentVariableUpdater, "ping", args
2600            );
2601        }
2602
2603        /**
2604         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code fsck}</B>
2605         *
2606         * <DIV CLASS="SHELL">{@code
2607         * $ set <environmentVariables>
2608         * $ cd <currentWorkingDirectory>
2609         * $ <input-redirect> | fsck <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2610         * }</DIV>
2611         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2612         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2613         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2614         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2615         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2616         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2617         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2618         * @param args Any set of switches and/or arguments to this BASH command.
2619         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2620         * @see Shell#FSCK(String[])
2621         * @throws IOException If there are problems while invoking the operating-system command
2622         */
2623        public static OSResponse FSCK(
2624                File                            currentWorkingDirectory,
2625                boolean                         mergeStdErrorAndStdOut,
2626                ProcessBuilder.Redirect         outputRedirect,
2627                ProcessBuilder.Redirect         inputRedirect,
2628                ProcessBuilder.Redirect         errorRedirect,
2629                Consumer<Map<String, String>>   environmentVariableUpdater,
2630                String...                       args
2631            )
2632            throws IOException
2633        {
2634            return ARGS_PLUS_ONE(
2635                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2636                errorRedirect, environmentVariableUpdater, "fsck", args
2637            );
2638        }
2639
2640        /**
2641         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code nslookup}</B>
2642         *
2643         * <DIV CLASS="SHELL">{@code
2644         * $ set <environmentVariables>
2645         * $ cd <currentWorkingDirectory>
2646         * $ <input-redirect> | nslookup <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2647         * }</DIV>
2648         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2649         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2650         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2651         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2652         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2653         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2654         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2655         * @param args Any set of switches and/or arguments to this BASH command.
2656         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2657         * @see Shell#NSLOOKUP(String[])
2658         * @throws IOException If there are problems while invoking the operating-system command
2659         */
2660        public static OSResponse NSLOOKUP(
2661                File                            currentWorkingDirectory,
2662                boolean                         mergeStdErrorAndStdOut,
2663                ProcessBuilder.Redirect         outputRedirect,
2664                ProcessBuilder.Redirect         inputRedirect,
2665                ProcessBuilder.Redirect         errorRedirect,
2666                Consumer<Map<String, String>>   environmentVariableUpdater,
2667                String...                       args
2668            )
2669            throws IOException
2670        {
2671            return ARGS_PLUS_ONE(
2672                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2673                errorRedirect, environmentVariableUpdater, "nslookup", args
2674            );
2675        }
2676
2677        /**
2678         * Runs the {@code UNIX / BASH / LINUX 'shell'} command: <B>{@code traceroute}</B>
2679         *
2680         * <DIV CLASS="SHELL">{@code
2681         * $ set <environmentVariables>
2682         * $ cd <currentWorkingDirectory>
2683         * $ <input-redirect> | traceroute <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2684         * }</DIV>
2685         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2686         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2687         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2688         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2689         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2690         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2691         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2692         * @param args Any set of switches and/or arguments to this BASH command.
2693         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2694         * @see Shell#TRACEROUTE(String[])
2695         * @throws IOException If there are problems while invoking the operating-system command
2696         */
2697        public static OSResponse TRACEROUTE(
2698                File                            currentWorkingDirectory,
2699                boolean                         mergeStdErrorAndStdOut,
2700                ProcessBuilder.Redirect         outputRedirect,
2701                ProcessBuilder.Redirect         inputRedirect,
2702                ProcessBuilder.Redirect         errorRedirect,
2703                Consumer<Map<String, String>>   environmentVariableUpdater,
2704                String...                       args
2705            )
2706            throws IOException
2707        {
2708            return ARGS_PLUS_ONE(
2709                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2710                errorRedirect, environmentVariableUpdater, "traceroute", args
2711            );
2712        }
2713
2714        /**
2715         * Runs the {@code UNIX / BASH / LINUX 'shell'} command named by the input parameter
2716         * {@code COMMAND_NAME}.
2717         *
2718         * <DIV CLASS="SHELL">{@code
2719         * $ set <environmentVariables>
2720         * $ cd <currentWorkingDirectory>
2721         * $ <input-redirect> | <COMMAND_NAME> <args[0]> <args[1]> ... <args[args.length-1]> | <output-redirect>
2722         * }</DIV>
2723         * @param currentWorkingDirectory <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_CUR_WDIR">
2724         * @param mergeStdErrorAndStdOut <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_MERGE_IE">
2725         * @param outputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_OUT_REDIR">
2726         * @param inputRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_INP_REDIR">
2727         * @param errorRedirect <EMBED CLASS="external-html" DATA-FILE-ID="SH_XL_ERR_REDIR">
2728         * @param environmentVariableUpdater <EMBED CLASS="external-html"
2729         *    DATA-FILE-ID="SH_XL_ENV_UPDT">
2730         * @param COMMAND_NAME This is the name of any UNIX command not already listed inside
2731         * this class.
2732         * @param args Any set of switches and/or arguments to this BASH command.
2733         * @return <EMBED CLASS="external-html" DATA-FILE-ID='OSRETXL'>
2734         * @see Shell#JAVA(String[])
2735         * @throws IOException If there are problems while invoking the operating-system command
2736         */
2737        public static OSResponse COMMAND(
2738                File                            currentWorkingDirectory,
2739                boolean                         mergeStdErrorAndStdOut,
2740                ProcessBuilder.Redirect         outputRedirect,
2741                ProcessBuilder.Redirect         inputRedirect,
2742                ProcessBuilder.Redirect         errorRedirect,
2743                Consumer<Map<String, String>>   environmentVariableUpdater,
2744                String                          COMMAND_NAME,
2745                String...                       args
2746            )
2747            throws IOException
2748        {
2749            return ARGS_PLUS_ONE(
2750                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2751                errorRedirect, environmentVariableUpdater, COMMAND_NAME, args
2752            );
2753        }
2754
2755        private static OSResponse ARGS_PLUS_ONE(
2756                File                            currentWorkingDirectory,
2757                boolean                         mergeStdErrorAndStdOut,
2758                ProcessBuilder.Redirect         outputRedirect,
2759                ProcessBuilder.Redirect         inputRedirect,
2760                ProcessBuilder.Redirect         errorRedirect,
2761                Consumer<Map<String, String>>   environmentVariableUpdater,
2762                String                          command,
2763                String...                       args
2764            )
2765            throws IOException 
2766        {
2767            String[] argsPlus1 = new String[args.length + 1];
2768            argsPlus1[0] = command;
2769
2770            for (int i=0; i < args.length; i++) argsPlus1[1 + i] = args[i];
2771
2772            OSResponse.PRINT_CMD(argsPlus1, appendable);
2773
2774            return OSResponse.RUN_CMD_PRINT_OUTPUT(
2775                currentWorkingDirectory, mergeStdErrorAndStdOut, outputRedirect, inputRedirect,
2776                errorRedirect, environmentVariableUpdater, argsPlus1,
2777                cmdOrCmdAndOutput ? NOPRINT.np : appendable
2778            );
2779        }
2780    }
2781
2782}