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

Function usage

src/nl.c:174–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172/* Print a usage message and quit. */
173
174void
175usage (int status)
176{
177 if (status != EXIT_SUCCESS)
178 emit_try_help ();
179 else
180 {
181 printf (_("\
182Usage: %s [OPTION]... [FILE]...\n\
183"),
184 program_name);
185 fputs (_("\
186Write each FILE to standard output, with line numbers added.\n\
187"), stdout);
188
189 emit_stdin_note ();
190 emit_mandatory_arg_note ();
191
192 oputs (_("\
193 -b, --body-numbering=STYLE use STYLE for numbering body lines\n\
194"));
195 oputs (_("\
196 -d, --section-delimiter=CC use CC for logical page delimiters\n\
197"));
198 oputs (_("\
199 -f, --footer-numbering=STYLE use STYLE for numbering footer lines\n\
200"));
201 oputs (_("\
202 -h, --header-numbering=STYLE use STYLE for numbering header lines\n\
203"));
204 oputs (_("\
205 -i, --line-increment=NUMBER line number increment at each line\n\
206"));
207 oputs (_("\
208 -l, --join-blank-lines=NUMBER group of NUMBER empty lines counted as one\n\
209"));
210 oputs (_("\
211 -n, --number-format=FORMAT insert line numbers according to FORMAT\n\
212"));
213 oputs (_("\
214 -p, --no-renumber do not reset line numbers for each section\n\
215"));
216 oputs (_("\
217 -s, --number-separator=STRING add STRING after (possible) line number\n\
218"));
219 oputs (_("\
220 -v, --starting-line-number=NUMBER first line number for each section\n\
221"));
222 oputs (_("\
223 -w, --number-width=NUMBER use NUMBER columns for line numbers\n\
224"));
225 oputs (HELP_OPTION_DESCRIPTION);
226 oputs (VERSION_OPTION_DESCRIPTION);
227 fputs (_("\
228\n\
229Default options are: -bt -d'\\:' -fn -hn -i1 -l1 -n'rn' -s<TAB> -v1 -w6\n\
230\n\
231CC are two delimiter characters used to construct logical page delimiters;\n\

Callers 1

mainFunction · 0.70

Calls 3

emit_stdin_noteFunction · 0.85
emit_mandatory_arg_noteFunction · 0.85
emit_ancillary_infoFunction · 0.85

Tested by

no test coverage detected