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

Function usage

src/seq.c:74–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72};
73
74void
75usage (int status)
76{
77 if (status != EXIT_SUCCESS)
78 emit_try_help ();
79 else
80 {
81 printf (_("\
82Usage: %s [OPTION]... LAST\n\
83 or: %s [OPTION]... FIRST LAST\n\
84 or: %s [OPTION]... FIRST INCREMENT LAST\n\
85"), program_name, program_name, program_name);
86 fputs (_("\
87Print numbers from FIRST to LAST, in steps of INCREMENT.\n\
88"), stdout);
89
90 emit_mandatory_arg_note ();
91
92 oputs (_("\
93 -f, --format=FORMAT\n\
94 use printf style floating-point FORMAT\n\
95"));
96 oputs (_("\
97 -s, --separator=STRING\n\
98 use STRING to separate numbers (default: \\n)\n\
99"));
100 oputs (_("\
101 -w, --equal-width\n\
102 equalize width by padding with leading zeroes\n\
103"));
104 oputs (HELP_OPTION_DESCRIPTION);
105 oputs (VERSION_OPTION_DESCRIPTION);
106 fputs (_("\
107\n\
108If FIRST or INCREMENT is omitted, it defaults to 1. That is, an\n\
109omitted INCREMENT defaults to 1 even when LAST is smaller than FIRST.\n\
110The sequence of numbers ends when the sum of the current number and\n\
111INCREMENT would become greater than LAST.\n\
112FIRST, INCREMENT, and LAST are interpreted as floating point values.\n\
113INCREMENT is usually positive if FIRST is smaller than LAST, and\n\
114INCREMENT is usually negative if FIRST is greater than LAST.\n\
115INCREMENT must not be 0; none of FIRST, INCREMENT and LAST may be NaN.\n\
116"), stdout);
117 fputs (_("\
118FORMAT must be suitable for printing one argument of type 'double';\n\
119it defaults to %.PRECf if FIRST, INCREMENT, and LAST are all fixed point\n\
120decimal numbers with maximum precision PREC, and to %g otherwise.\n\
121"), stdout);
122 emit_ancillary_info (PROGRAM_NAME);
123 }
124 exit (status);
125}
126
127/* A command-line operand. */
128struct operand

Callers 2

scan_argFunction · 0.70
mainFunction · 0.70

Calls 2

emit_mandatory_arg_noteFunction · 0.85
emit_ancillary_infoFunction · 0.85

Tested by

no test coverage detected