org.apache.felix.gogo.jline

## Class Posix

- java.lang.Object
- - org.apache.felix.gogo.jline.Posix

    public class Posix
    extends Object

Posix-like utilities.

See Also:
  http://www.opengroup.org/onlinepubs/009695399/utilities/contents.html

### Nested Class Summary

Nested Classes
`protected static class` `Posix.HelpException`
`static class` `Posix.SortComparator`

### Field Summary

Fields
`static String` `DEFAULT_GREP_COLORS`
`static String` `DEFAULT_LS_COLORS`

### Constructor Summary

Constructors
Constructor and Description
`Posix(org.apache.felix.service.command.CommandProcessor processor)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `_main(org.apache.felix.service.command.CommandSession session, String[] argv)`
`protected void` `cat(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `cd(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `clear(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `date(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `echo(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, Object[] argv)`
`protected String` `get(org.apache.felix.service.command.CommandSession session, String name)`
`static Map<String,String>` `getColorMap(org.apache.felix.service.command.CommandSession session, String name, String def)`
`static Map<String,String>` `getLsColorMap(org.apache.felix.service.command.CommandSession session)`
`protected void` `grep(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `head(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `less(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `ls(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `nano(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected org.jline.builtins.Options` `parseOptions(org.apache.felix.service.command.CommandSession session, String[] usage, Object[] argv)`
`protected void` `pwd(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected static void` `read(BufferedReader r, List<String> lines)`
`protected Object` `run(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `sleep(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `sort(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `tail(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `tmux(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `ttop(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `watch(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`
`protected void` `wc(org.apache.felix.service.command.CommandSession session, org.apache.felix.service.command.Process process, String[] argv)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_LS_COLORS

    public static final String DEFAULT_LS_COLORS

See Also:
  Constant Field Values

#### DEFAULT_GREP_COLORS

    public static final String DEFAULT_GREP_COLORS

See Also:
  Constant Field Values

### Constructor Detail

#### Posix

    public Posix(org.apache.felix.service.command.CommandProcessor processor)

### Method Detail

#### _main

    public void _main(org.apache.felix.service.command.CommandSession session,
                      String[] argv)

#### parseOptions

    protected org.jline.builtins.Options parseOptions(org.apache.felix.service.command.CommandSession session,
                                                      String[] usage,
                                                      Object[] argv)
                                               throws Exception

Throws:
  `Exception`

#### get

    protected String get(org.apache.felix.service.command.CommandSession session,
                         String name)

#### run

    protected Object run(org.apache.felix.service.command.CommandSession session,
                         org.apache.felix.service.command.Process process,
                         String[] argv)
                  throws Exception

Throws:
  `Exception`

#### date

    protected void date(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        String[] argv)
                 throws Exception

Throws:
  `Exception`

#### wc

    protected void wc(org.apache.felix.service.command.CommandSession session,
                      org.apache.felix.service.command.Process process,
                      String[] argv)
               throws Exception

Throws:
  `Exception`

#### head

    protected void head(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        String[] argv)
                 throws Exception

Throws:
  `Exception`

#### tail

    protected void tail(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        String[] argv)
                 throws Exception

Throws:
  `Exception`

#### clear

    protected void clear(org.apache.felix.service.command.CommandSession session,
                         org.apache.felix.service.command.Process process,
                         String[] argv)
                  throws Exception

Throws:
  `Exception`

#### tmux

    protected void tmux(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        String[] argv)
                 throws Exception

Throws:
  `Exception`

#### ttop

    protected void ttop(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        String[] argv)
                 throws Exception

Throws:
  `Exception`

#### nano

    protected void nano(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        String[] argv)
                 throws Exception

Throws:
  `Exception`

#### watch

    protected void watch(org.apache.felix.service.command.CommandSession session,
                         org.apache.felix.service.command.Process process,
                         String[] argv)
                  throws Exception

Throws:
  `Exception`

#### less

    protected void less(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        String[] argv)
                 throws Exception

Throws:
  `Exception`

#### sort

    protected void sort(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        String[] argv)
                 throws Exception

Throws:
  `Exception`

#### pwd

    protected void pwd(org.apache.felix.service.command.CommandSession session,
                       org.apache.felix.service.command.Process process,
                       String[] argv)
                throws Exception

Throws:
  `Exception`

#### cd

    protected void cd(org.apache.felix.service.command.CommandSession session,
                      org.apache.felix.service.command.Process process,
                      String[] argv)
               throws Exception

Throws:
  `Exception`

#### ls

    protected void ls(org.apache.felix.service.command.CommandSession session,
                      org.apache.felix.service.command.Process process,
                      String[] argv)
               throws Exception

Throws:
  `Exception`

#### cat

    protected void cat(org.apache.felix.service.command.CommandSession session,
                       org.apache.felix.service.command.Process process,
                       String[] argv)
                throws Exception

Throws:
  `Exception`

#### echo

    protected void echo(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        Object[] argv)
                 throws Exception

Throws:
  `Exception`

#### grep

    protected void grep(org.apache.felix.service.command.CommandSession session,
                        org.apache.felix.service.command.Process process,
                        String[] argv)
                 throws Exception

Throws:
  `Exception`

#### sleep

    protected void sleep(org.apache.felix.service.command.CommandSession session,
                         org.apache.felix.service.command.Process process,
                         String[] argv)
                  throws Exception

Throws:
  `Exception`

#### read

    protected static void read(BufferedReader r,
                               List<String> lines)
                        throws IOException

Throws:
  `IOException`

#### getLsColorMap

    public static Map<String,String> getLsColorMap(org.apache.felix.service.command.CommandSession session)

#### getColorMap

    public static Map<String,String> getColorMap(org.apache.felix.service.command.CommandSession session,
                                                 String name,
                                                 String def)