MCPcopy Create free account
hub / github.com/coreutils/coreutils / usage

Function usage

src/uniq.c:151–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149};
150
151void
152usage (int status)
153{
154 if (status != EXIT_SUCCESS)
155 emit_try_help ();
156 else
157 {
158 printf (_("\
159Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\
160"),
161 program_name);
162 fputs (_("\
163Filter adjacent matching lines from INPUT (or standard input),\n\
164writing to OUTPUT (or standard output).\n\
165\n\
166With no options, matching lines are merged to the first occurrence.\n\
167"), stdout);
168
169 emit_mandatory_arg_note ();
170
171 oputs (_("\
172 -c, --count\n\
173 prefix lines by the number of occurrences\n\
174"));
175 oputs (_("\
176 -d, --repeated\n\
177 only print duplicate lines, one for each group\n\
178"));
179 oputs (_("\
180 -D\n\
181 print all duplicate lines\n\
182"));
183 oputs (_("\
184 --all-repeated[=METHOD]\n\
185 like -D, but allow separating groups with an empty line;\n\
186 METHOD={none(default),prepend,separate}\n\
187"));
188 oputs (_("\
189 -f, --skip-fields=N\n\
190 avoid comparing the first N fields\n\
191"));
192 oputs (_("\
193 --group[=METHOD]\n\
194 show all items, separating groups with an empty line;\n\
195 METHOD={separate(default),prepend,append,both}\n\
196"));
197 oputs (_("\
198 -i, --ignore-case\n\
199 ignore differences in case when comparing\n\
200"));
201 oputs (_("\
202 -s, --skip-chars=N\n\
203 avoid comparing the first N characters\n\
204"));
205 oputs (_("\
206 -u, --unique\n\
207 only print unique lines\n\
208"));

Callers 1

mainFunction · 0.70

Calls 2

emit_mandatory_arg_noteFunction · 0.85
emit_ancillary_infoFunction · 0.85

Tested by

no test coverage detected