public final class SedOptionSets extends Object
sed
command with the
the following options:
-n | --quiet | Suppress the default output (in which each line, after it is examined for editing, is written to standard output). Only lines explicitly selected for output are written. | |||
-g | --global | Globally substitute for all non-overlapping instances of the regexp
rather than just the first one.
(This option is ignored if the occurrence operand is specified). | |||
-p | --print | Write the matched line to standard output. | |||
-l | --lineNumber | Writes the current line number on a separate line to the standard output. | |||
-I | --ignoreCase | Use case insensitive pattern matching. | |||
-s | --substitute | Substitutes the replacement string for instances of the regexp in
the matched line.
The characters "$0" appearing in the replacement are replaced by the line matching the regexp. The characters "$n", where n is a digit other than zero, are replaced by the text matched by the corresponding backreference expression (aka group). The special meaning of "$n" in this context can be suppressed by preceding it by a backslash. A line can be split by substituting a newline ('\n') into it. A substitution is considered to have been performed even if the replacement string is identical to the string that it replaces. | |||
-a | --append | Append string2 as a separate line after the matched line. | |||
-i | --insert | Insert string2 as a separate line before the matched line. | |||
-c | --change | Write string2 as a separate line instead of the matched line. | |||
-d | --delete | Delete the matched line. | |||
-y | --translate | Replace all occurrences of characters in string1 with the corresponding characters in string2. If the number of characters in the two strings are not equal, or if any of the characters in string1 appear more than once, the results are undefined. |
This class serves as entry point to every possible set of sed
options
defined as an enum constant. With this explicit expansion of all possible
option combinations, options can be passed to the command in a very compact
form, such as:
sed(Sed.Options.n, ...); sed(Sed.Options.n.g, ...); ... sed(Sed.Options.n.g.p.l.I.s.a.i.c.d.y, ...);
Modifier and Type | Field and Description |
---|---|
SedOptionSet_Iaglnp |
a
Option
"-a" : Append string2 as a separate line after the matched line. |
SedOptionSet_Iaglnp |
append
Option
"--append" : Append string2 as a separate line after the matched line. |
SedOptionSet_Icglnp |
c
Option
"-c" : Write string2 as a separate line instead of the matched line. |
SedOptionSet_Icglnp |
change
Option
"--change" : Write string2 as a separate line instead of the matched line. |
SedOptionSet_Idglnp |
d
Option
"-d" : Delete the matched line. |
SedOptionSet_Idglnp |
delete
Option
"--delete" : Delete the matched line. |
SedOptionSet_Iacdgilnpsy |
g
Option
"-g" : Globally substitute for all non-overlapping instances of the regexp
rather than just the first one. |
SedOptionSet_Iacdgilnpsy |
global
Option
"--global" : Globally substitute for all non-overlapping instances of the regexp
rather than just the first one. |
SedOptionSet_Igilnp |
i
Option
"-i" : Insert string2 as a separate line before the matched line. |
SedOptionSet_Iacdgilnpsy |
I
Option
"-I" : Use case insensitive pattern matching. |
SedOptionSet_Iacdgilnpsy |
ignoreCase
Option
"--ignoreCase" : Use case insensitive pattern matching. |
SedOptionSet_Igilnp |
insert
Option
"--insert" : Insert string2 as a separate line before the matched line. |
static SedOptionSets |
INSTANCE
The singleton instance.
|
SedOptionSet_Iacdgilnpsy |
l
Option
"-l" : Writes the current line number on a separate line to the standard
output. |
SedOptionSet_Iacdgilnpsy |
lineNumber
Option
"--lineNumber" : Writes the current line number on a separate line to the standard
output. |
SedOptionSet_Iacdgilnpsy |
n
Option
"-n" : Suppress the default output (in which each line, after it is
examined for editing, is written to standard output). |
SedOptionSet_Iacdgilnpsy |
p
Option
"-p" : Write the matched line to standard output. |
SedOptionSet_Iacdgilnpsy |
print
Option
"--print" : Write the matched line to standard output. |
SedOptionSet_Iacdgilnpsy |
quiet
Option
"--quiet" : Suppress the default output (in which each line, after it is
examined for editing, is written to standard output). |
SedOptionSet_Iglnps |
s
Option
"-s" : Substitutes the replacement string for instances of the regexp in
the matched line. |
SedOptionSet_Iglnps |
substitute
Option
"--substitute" : Substitutes the replacement string for instances of the regexp in
the matched line. |
SedOptionSet_Iglnpy |
translate
Option
"--translate" : Replace all occurrences of characters in string1 with the
corresponding characters in string2. |
SedOptionSet_Iglnpy |
y
Option
"-y" : Replace all occurrences of characters in string1 with the
corresponding characters in string2. |
Constructor and Description |
---|
SedOptionSets() |
public static final SedOptionSets INSTANCE
public final SedOptionSet_Iaglnp a
"-a"
: Append string2 as a separate line after the matched line.
The option "-a"
is equivalent to the "--
append
"
option.
public final SedOptionSet_Iaglnp append
"--append"
: Append string2 as a separate line after the matched line.
The option "--append"
is equivalent to the "-
a
"
option.
public final SedOptionSet_Icglnp c
"-c"
: Write string2 as a separate line instead of the matched line.
The option "-c"
is equivalent to the "--
change
"
option.
public final SedOptionSet_Icglnp change
"--change"
: Write string2 as a separate line instead of the matched line.
The option "--change"
is equivalent to the "-
c
"
option.
public final SedOptionSet_Idglnp d
"-d"
: Delete the matched line.
The option "-d"
is equivalent to the "--
delete
"
option.
public final SedOptionSet_Idglnp delete
"--delete"
: Delete the matched line.
The option "--delete"
is equivalent to the "-
d
"
option.
public final SedOptionSet_Iacdgilnpsy g
"-g"
: Globally substitute for all non-overlapping instances of the regexp
rather than just the first one.
(This option is ignored if the occurrence operand is specified).
The option "-g"
is equivalent to the "--
global
"
option.
public final SedOptionSet_Iacdgilnpsy global
"--global"
: Globally substitute for all non-overlapping instances of the regexp
rather than just the first one.
(This option is ignored if the occurrence operand is specified).
The option "--global"
is equivalent to the "-
g
"
option.
public final SedOptionSet_Iacdgilnpsy I
"-I"
: Use case insensitive pattern matching.
The option "-I"
is equivalent to the "--
ignoreCase
"
option.
public final SedOptionSet_Iacdgilnpsy ignoreCase
"--ignoreCase"
: Use case insensitive pattern matching.
The option "--ignoreCase"
is equivalent to the "-
I
"
option.
public final SedOptionSet_Igilnp i
"-i"
: Insert string2 as a separate line before the matched line.
The option "-i"
is equivalent to the "--
insert
"
option.
public final SedOptionSet_Igilnp insert
"--insert"
: Insert string2 as a separate line before the matched line.
The option "--insert"
is equivalent to the "-
i
"
option.
public final SedOptionSet_Iacdgilnpsy l
"-l"
: Writes the current line number on a separate line to the standard
output.
The option "-l"
is equivalent to the "--
lineNumber
"
option.
public final SedOptionSet_Iacdgilnpsy lineNumber
"--lineNumber"
: Writes the current line number on a separate line to the standard
output.
The option "--lineNumber"
is equivalent to the "-
l
"
option.
public final SedOptionSet_Iacdgilnpsy p
"-p"
: Write the matched line to standard output.
The option "-p"
is equivalent to the "--
print
"
option.
public final SedOptionSet_Iacdgilnpsy print
"--print"
: Write the matched line to standard output.
The option "--print"
is equivalent to the "-
p
"
option.
public final SedOptionSet_Iacdgilnpsy n
"-n"
: Suppress the default output (in which each line, after it is
examined for editing, is written to standard output). Only lines
explicitly selected for output are written.
The option "-n"
is equivalent to the "--
quiet
"
option.
public final SedOptionSet_Iacdgilnpsy quiet
"--quiet"
: Suppress the default output (in which each line, after it is
examined for editing, is written to standard output). Only lines
explicitly selected for output are written.
The option "--quiet"
is equivalent to the "-
n
"
option.
public final SedOptionSet_Iglnps s
"-s"
: Substitutes the replacement string for instances of the regexp in
the matched line.
The characters "$0" appearing in the replacement are replaced by the line matching the regexp. The characters "$n", where n is a digit other than zero, are replaced by the text matched by the corresponding backreference expression (aka group). The special meaning of "$n" in this context can be suppressed by preceding it by a backslash.
A line can be split by substituting a newline ('\n') into it.
A substitution is considered to have been performed even if the replacement string is identical to the string that it replaces.
The option "-s"
is equivalent to the "--
substitute
"
option.
public final SedOptionSet_Iglnps substitute
"--substitute"
: Substitutes the replacement string for instances of the regexp in
the matched line.
The characters "$0" appearing in the replacement are replaced by the line matching the regexp. The characters "$n", where n is a digit other than zero, are replaced by the text matched by the corresponding backreference expression (aka group). The special meaning of "$n" in this context can be suppressed by preceding it by a backslash.
A line can be split by substituting a newline ('\n') into it.
A substitution is considered to have been performed even if the replacement string is identical to the string that it replaces.
The option "--substitute"
is equivalent to the "-
s
"
option.
public final SedOptionSet_Iglnpy y
"-y"
: Replace all occurrences of characters in string1 with the
corresponding characters in string2. If the number of characters in
the two strings are not equal, or if any of the characters in
string1 appear more than once, the results are undefined.
The option "-y"
is equivalent to the "--
translate
"
option.
public final SedOptionSet_Iglnpy translate
"--translate"
: Replace all occurrences of characters in string1 with the
corresponding characters in string2. If the number of characters in
the two strings are not equal, or if any of the characters in
string1 appear more than once, the results are undefined.
The option "--translate"
is equivalent to the "-
y
"
option.
public SedOptionSets()
Copyright © 2024. All rights reserved.