Package | Description |
---|---|
org.unix4j.command |
Declares the basic command interface and contains related classes used by
most command implementations.
|
org.unix4j.context |
Contains interfaces and classes defining the
ExecutionContext passed to the
execute
method of commands. |
org.unix4j.operation |
Contains the
LineOperation
interface and the AdHocCommand
implementation facilitating the creation of ad-hoc commands. |
org.unix4j.processor |
Defines
LineProcessor and
InputProcessor , two interfaces
used for line-by-line input processing, and provides some basic
implementations for both interfaces. |
org.unix4j.unix.cat |
Contains private classes used by the
cat command. |
org.unix4j.unix.cd |
Contains private classes used by the
cd command. |
org.unix4j.unix.cut |
Contains private classes used by the
cut command. |
org.unix4j.unix.echo |
Contains private classes used by the
echo command. |
org.unix4j.unix.find |
Contains private classes used by the
find command. |
org.unix4j.unix.from |
Contains private classes used by the
from command. |
org.unix4j.unix.grep |
Contains private classes used by the
grep command. |
org.unix4j.unix.head |
Contains private classes used by the
head command. |
org.unix4j.unix.ls |
Contains private classes used by the
ls command. |
org.unix4j.unix.sed |
Contains private classes used by the
sed command. |
org.unix4j.unix.sort |
Contains private classes used by the
sort command. |
org.unix4j.unix.tail |
Contains private classes used by the
tail command. |
org.unix4j.unix.uniq |
Contains private classes used by the
uniq command. |
org.unix4j.unix.wc |
Contains private classes used by the
wc command. |
org.unix4j.unix.xargs |
Contains private classes used by the
xargs command. |
org.unix4j.variable |
Defines interfaces and classes to facilitate variables that can be used as
command arguments.
|
Modifier and Type | Method and Description |
---|---|
LineProcessor |
NoOp.execute(ExecutionContext context,
LineProcessor output) |
LineProcessor |
Command.execute(ExecutionContext context,
LineProcessor output)
Executes this command and returns a
LineProcessor object. |
LineProcessor |
JoinedCommand.execute(ExecutionContext context,
LineProcessor output)
Executes this joined command redirecting the output of the first command
such that it becomes the input of the second command.
|
A |
AbstractCommand.getArguments(ExecutionContext context) |
A |
Command.getArguments(ExecutionContext context)
Returns the implementation specific command arguments and options for the
given execution context.
|
A |
JoinedCommand.getArguments(ExecutionContext context) |
NoOp.Args |
NoOp.Args.getForContext(ExecutionContext context) |
A |
Arguments.getForContext(ExecutionContext context)
Returns an arguments object for the given execution context with resolved
variables if necessary and possible.
|
Modifier and Type | Class and Description |
---|---|
class |
DefaultExecutionContext
Default execution context implementation with setters for some values and
meaningful defaults for instance taken from system properties.
|
class |
DerivedExecutionContext
A derived execution context allows overriding of some values while forwarding
other getter calls to an original delegate context.
|
Modifier and Type | Method and Description |
---|---|
ExecutionContext |
ExecutionContextFactory.createExecutionContext()
Creates and returns a new execution context instance.
|
Constructor and Description |
---|
DerivedExecutionContext(ExecutionContext delegate)
Constructor for new derived execution context with the specified delegate
context.
|
Modifier and Type | Method and Description |
---|---|
LineProcessor |
AdHocCommand.execute(ExecutionContext context,
LineProcessor output) |
AdHocCommand.Args |
AdHocCommand.Args.getForContext(ExecutionContext context) |
void |
LineOperation.operate(ExecutionContext context,
Line input,
LineProcessor output)
Performs an operation for the given input line.
|
Modifier and Type | Method and Description |
---|---|
protected ExecutionContext |
AbstractLineProcessor.getContext()
Returns the execution context that was passed to the constructor
|
Constructor and Description |
---|
AbstractLineProcessor(Command<A> command,
ExecutionContext context,
LineProcessor output)
Constructor with command creating this processor, execution context and
output to write to.
|
Modifier and Type | Method and Description |
---|---|
LineProcessor |
CatCommand.execute(ExecutionContext context,
LineProcessor output) |
CatArguments |
CatArguments.getForContext(ExecutionContext context) |
Constructor and Description |
---|
CatProcessor(Command<CatArguments> command,
ExecutionContext context,
LineProcessor output) |
NumberLinesProcessor(Command<CatArguments> command,
ExecutionContext context,
LineProcessor output) |
SqueezeEmptyLinesProcessor(Command<CatArguments> command,
ExecutionContext context,
LineProcessor output) |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
CdCommand.execute(ExecutionContext context,
LineProcessor output) |
CdArguments |
CdArguments.getForContext(ExecutionContext context) |
String |
CdArguments.getPath(ExecutionContext context)
Returns the
<path> (variables are resolved): the directory to become the new current working directory;
wildcards * and ? are supported; relative paths are resolved on the
basis of the current working directory. |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
CutCommand.execute(ExecutionContext context,
LineProcessor output) |
String |
CutArguments.getDelimiter(ExecutionContext context)
Returns the
<delimiter> (variables are resolved): use as the output delimiter the default is to use the input delimiter |
CutArguments |
CutArguments.getForContext(ExecutionContext context) |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
EchoCommand.execute(ExecutionContext context,
LineProcessor output) |
EchoArguments |
EchoArguments.getForContext(ExecutionContext context) |
String |
EchoArguments.getString(ExecutionContext context)
Returns the
<string> (variables are resolved): A string to be written to standard output. |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
FindCommand.execute(ExecutionContext context,
LineProcessor output) |
FindArguments |
FindArguments.getForContext(ExecutionContext context) |
String |
FindArguments.getName(ExecutionContext context)
Returns the
<name> (variables are resolved): Name pattern to match the file name after removing the path with the
leading directories; wildcards * and ? are supported, or full
regular expressions if either of the options -regex (-r) or
-iregex (-i) is specified. |
String |
FindArguments.getPath(ExecutionContext context)
Returns the
<path> (variables are resolved): Starting point for the search in the directory hierarchy;
wildcards * and ? are supported; relative paths are resolved on the
basis of the current working directory. |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
FromCommand.execute(ExecutionContext context,
LineProcessor output) |
FromArguments |
FromArguments.getForContext(ExecutionContext context) |
String |
FromArguments.getPath(ExecutionContext context)
Returns the
<path> (variables are resolved): the file to use as input; wildcards * and ? are supported; relative
paths are resolved on the basis of the current working directory. |
String |
FromArguments.getResource(ExecutionContext context)
Returns the
<resource> (variables are resolved): a path to the file to redirect to the next command. |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
GrepCommand.execute(ExecutionContext context,
LineProcessor output) |
GrepArguments |
GrepArguments.getForContext(ExecutionContext context) |
String |
GrepArguments.getRegexp(ExecutionContext context)
Returns the
<regexp> (variables are resolved): Lines will be printed which match the given regular expression. |
Constructor and Description |
---|
AbstractGrepProcessor(GrepCommand command,
ExecutionContext context,
LineProcessor output,
LineMatcher matcher) |
CountMatchingLinesInputProcessor(GrepCommand command,
ExecutionContext context,
LineProcessor output,
LineMatcher matcher) |
CountMatchingLinesProcessor(GrepCommand command,
ExecutionContext context,
LineProcessor output,
LineMatcher matcher) |
WriteFilesWithMatchingLinesProcessor(GrepCommand command,
ExecutionContext context,
LineProcessor output,
LineMatcher matcher) |
WriteMatchingLinesInputProcessor(GrepCommand command,
ExecutionContext context,
LineMatcher matcher) |
WriteMatchingLinesProcessor(GrepCommand command,
ExecutionContext context,
LineProcessor output,
LineMatcher matcher) |
WriteMatchingLinesWithLineNumberProcessor(GrepCommand command,
ExecutionContext context,
LineProcessor output,
LineMatcher matcher) |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
HeadCommand.execute(ExecutionContext context,
LineProcessor output) |
HeadArguments |
HeadArguments.getForContext(ExecutionContext context) |
Constructor and Description |
---|
AbstractHeadProcessor(HeadCommand command,
ExecutionContext context,
LineProcessor output) |
HeadCharsProcessor(HeadCommand command,
ExecutionContext context,
LineProcessor output) |
HeadLinesProcessor(HeadCommand command,
ExecutionContext context,
LineProcessor output) |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
LsCommand.execute(ExecutionContext context,
LineProcessor output) |
LsArguments |
LsArguments.getForContext(ExecutionContext context) |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
SedCommand.execute(ExecutionContext context,
LineProcessor output) |
SedArguments |
SedArguments.getForContext(ExecutionContext context) |
String |
SedArguments.getRegexp(ExecutionContext context)
Returns the
<regexp> (variables are resolved): Regular expression matched against a line. |
String |
SedArguments.getReplacement(ExecutionContext context)
Returns the
<replacement> (variables are resolved): Replacement string for substitute command. |
String |
SedArguments.getScript(ExecutionContext context)
Returns the
<script> (variables are resolved): Sed script as one string, such as "s/original/replacement/g". |
String |
SedArguments.getString1(ExecutionContext context)
Returns the
<string1> (variables are resolved): Regular expression matched against a line for all commands except
for command y where string1 contains the source characters for the
translation. |
String |
SedArguments.getString2(ExecutionContext context)
Returns the
<string2> (variables are resolved): Replacement string for substitute command s; appended, inserted or
changed text for a, i and c command; destination characters for
translate command y; ignored by all other commands. |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
SortCommand.execute(ExecutionContext context,
LineProcessor output) |
SortArguments |
SortArguments.getForContext(ExecutionContext context) |
Constructor and Description |
---|
AbstractSortProcessor(SortCommand command,
ExecutionContext context,
LineProcessor output) |
CheckProcessor(SortCommand command,
ExecutionContext context,
LineProcessor output) |
MergeProcessor(SortCommand command,
ExecutionContext context,
LineProcessor output,
List<? extends Input> inputs) |
SortProcessor(SortCommand command,
ExecutionContext context,
LineProcessor output) |
UniqueSortProcessor(SortCommand command,
ExecutionContext context,
LineProcessor output) |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
TailCommand.execute(ExecutionContext context,
LineProcessor output) |
TailArguments |
TailArguments.getForContext(ExecutionContext context) |
Constructor and Description |
---|
AbstractTailProcessor(TailCommand command,
ExecutionContext context,
LineProcessor output) |
TailCharsFromEndProcessor(TailCommand command,
ExecutionContext context,
LineProcessor output) |
TailCharsFromStartProcessor(TailCommand command,
ExecutionContext context,
LineProcessor output) |
TailLinesFromEndProcessor(TailCommand command,
ExecutionContext context,
LineProcessor output) |
TailLinesFromStartProcessor(TailCommand command,
ExecutionContext context,
LineProcessor output) |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
UniqCommand.execute(ExecutionContext context,
LineProcessor output) |
UniqArguments |
UniqArguments.getForContext(ExecutionContext context) |
String |
UniqArguments.getPath(ExecutionContext context)
Returns the
<path> (variables are resolved): The files or directories used as starting point for the listing;
wildcards * and ? are supported; relative paths are resolved on the
basis of the current working directory. |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
WcCommand.execute(ExecutionContext context,
LineProcessor output) |
WcArguments |
WcArguments.getForContext(ExecutionContext context) |
Constructor and Description |
---|
WcFileProcessor(ExecutionContext context,
WcArguments args) |
WcMultipleFilesProcessor(ExecutionContext context,
List<? extends Input> inputs,
LineProcessor output,
WcArguments args) |
WcProcessor(WcCommand command,
ExecutionContext context,
LineProcessor output) |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
XargsCommand.execute(ExecutionContext context,
LineProcessor output) |
String |
XargsArguments.getDelimiter(ExecutionContext context)
Returns the
<delimiter> (variables are resolved): Input items are terminated by the specified characters. |
String |
XargsArguments.getEof(ExecutionContext context)
Returns the
<eof> (variables are resolved): If the end of file string occurs as a line of input, the rest of the
input is ignored. |
XargsArguments |
XargsArguments.getForContext(ExecutionContext context) |
Constructor and Description |
---|
XargsLineProcessor(XargsCommand command,
ExecutionContext context,
LineProcessor output) |
Modifier and Type | Method and Description |
---|---|
abstract Object |
ExecutionContextVariableResolver.Variable.getValue(ExecutionContext executionContext) |
Constructor and Description |
---|
ExecutionContextVariableResolver(ExecutionContext executionContext)
Constructor with execution context.
|
Copyright © 2024. All rights reserved.