Package: org.apache.groovy.groovysh.jline

## [Java] Class GroovyPosixCommands

- org.apache.groovy.groovysh.jline.GroovyPosixCommands

-     public class GroovyPosixCommands
      extends Object

  Groovy-aware implementations of groovysh POSIX-style commands.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static void` | `cat(Context context, Object[] argv)` Writes the supplied files, variables, or standard input to the current output stream.
    `` | `public static void` | `grep(Context context, Object[] argv)` Searches the selected inputs for lines matching the supplied pattern.
    `` | `public static void` | `head(Context context, Object[] argv)` Prints the beginning of each requested input.
    `` | `public static void` | `less(Context context, String[] argv)` Displays the requested inputs in the less viewer, or streams them when not interactive.
    `` | `public static void` | `ls(Context context, Object[] argv)` Lists directory entries using the current groovysh working directory.
    `` | `public static void` | `sort(Context context, Object[] argv)` Sorts the requested inputs and writes the ordered lines to the current output.
    `` | `public static void` | `tail(Context context, Object[] argv)` Prints the end of each requested input.
    `` | `public static void` | `wc(Context context, Object[] argv)` Counts lines, words, characters, or bytes for the selected inputs.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public static void cat(Context context, Object[] argv)

      Writes the supplied files, variables, or standard input to the current output stream.

      throws:
        Exception if an input cannot be resolved or read
      Parameters:
        `context` - command execution context
        `argv` - command name and arguments

    - #### public static void grep(Context context, Object[] argv)

      Searches the selected inputs for lines matching the supplied pattern.

      throws:
        Exception if the search cannot be completed
      Parameters:
        `context` - command execution context
        `argv` - command name and arguments

    - #### public static void head(Context context, Object[] argv)

      Prints the beginning of each requested input.

      throws:
        Exception if an input cannot be read
      Parameters:
        `context` - command execution context
        `argv` - command name and arguments

    - #### public static void less(Context context, String[] argv)

      Displays the requested inputs in the less viewer, or streams them when not interactive.

      throws:
        Exception if the viewer cannot be initialized or an input cannot be opened
      Parameters:
        `context` - command execution context
        `argv` - command name and arguments

    - #### public static void ls(Context context, Object[] argv)

      Lists directory entries using the current groovysh working directory.

      throws:
        Exception if the listing cannot be produced
      Parameters:
        `context` - command execution context
        `argv` - command name and arguments

    - #### public static void sort(Context context, Object[] argv)

      Sorts the requested inputs and writes the ordered lines to the current output.

      throws:
        Exception if an input cannot be read or sorted
      Parameters:
        `context` - command execution context
        `argv` - command name and arguments

    - #### public static void tail(Context context, Object[] argv)

      Prints the end of each requested input.

      throws:
        Exception if an input cannot be read
      Parameters:
        `context` - command execution context
        `argv` - command name and arguments

    - #### public static void wc(Context context, Object[] argv)

      Counts lines, words, characters, or bytes for the selected inputs.

      throws:
        Exception if an input cannot be processed
      Parameters:
        `context` - command execution context
        `argv` - command name and arguments