You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-m, --mode=[replace|line|lineinfile|template] replacement mode - replace: replace match with term; line: replace line with term; lineinfile: replace line with term or if not found append to term to file; template:
21
+
parse content as golang template, search value have to start uppercase (default: replace)
29
22
-s, --search= search term
30
23
-r, --replace= replacement term
31
-
-i, --case-insensitive ignore case of pattern to match
32
-
upper and lowercase characters
24
+
-i, --case-insensitive ignore case of pattern to match upper and lowercase characters
33
25
--stdin process stdin as input
34
-
--once=[keep|unique] replace search term only one in
35
-
a file, keep duplicaes (keep,
36
-
default) or remove them (unique)
26
+
-o, --output= write changes to this file (in one file mode)
27
+
--once=[keep|unique] replace search term only one in a file, keep duplicaes (keep, default) or remove them (unique)
37
28
--regex treat pattern as regex
38
-
--regex-backrefs enable backreferences in
39
-
replace term
29
+
--regex-backrefs enable backreferences in replace term
40
30
--regex-posix parse regex term as POSIX regex
41
31
--path= use files in this path
42
-
--path-pattern= file pattern (* for wildcard,
43
-
only basename of file)
32
+
--path-pattern= file pattern (* for wildcard, only basename of file)
44
33
--path-regex= file pattern (regex, full path)
45
-
--ignore-empty ignore empty file list,
46
-
otherwise this will result in
47
-
an error
34
+
--ignore-empty ignore empty file list, otherwise this will result in an error
CaseInsensitivebool`short:"i" long:"case-insensitive" description:"ignore case of pattern to match upper and lowercase characters"`
55
55
Stdinbool` long:"stdin" description:"process stdin as input"`
56
+
Outputstring`short:"o" long:"output" description:"write changes to this file (in one file mode)"`
56
57
Oncestring` long:"once" description:"replace search term only one in a file, keep duplicaes (keep, default) or remove them (unique)" optional:"true" optional-value:"keep" choice:"keep" choice:"unique"`
57
58
Regexbool` long:"regex" description:"treat pattern as regex"`
58
59
RegexBackrefbool` long:"regex-backrefs" description:"enable backreferences in replace term"`
0 commit comments