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

Function usage

src/stdbuf.c:83–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void
84usage (int status)
85{
86 if (status != EXIT_SUCCESS)
87 emit_try_help ();
88 else
89 {
90 printf (_("Usage: %s OPTION... COMMAND\n"), program_name);
91 fputs (_("\
92Run COMMAND, with modified buffering operations for its standard streams.\n\
93"), stdout);
94
95 emit_mandatory_arg_note ();
96
97 oputs (_("\
98 -i, --input=MODE adjust standard input stream buffering\n\
99"));
100 oputs (_("\
101 -o, --output=MODE adjust standard output stream buffering\n\
102"));
103 oputs (_("\
104 -e, --error=MODE adjust standard error stream buffering\n\
105"));
106 oputs (HELP_OPTION_DESCRIPTION);
107 oputs (VERSION_OPTION_DESCRIPTION);
108 fputs (_("\n\
109If MODE is 'L' the corresponding stream will be line buffered.\n\
110This option is invalid with standard input.\n"), stdout);
111 fputs (_("\n\
112If MODE is '0' the corresponding stream will be unbuffered.\n\
113"), stdout);
114 fputs (_("\n\
115Otherwise MODE is a number which may be followed by one of the following:\n\
116KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G,T,P,E,Z,Y,R,Q.\n\
117Binary prefixes can be used, too: KiB=K, MiB=M, and so on.\n\
118In this case the corresponding stream will be fully buffered with the buffer\n\
119size set to MODE bytes.\n\
120"), stdout);
121 fputs (_("\n\
122NOTE: If COMMAND adjusts the buffering of its standard streams ('tee' does\n\
123for example) then that will override corresponding changes by 'stdbuf'.\n\
124Also some filters (like 'dd' and 'cat' etc.) don't use streams for I/O,\n\
125and are thus unaffected by 'stdbuf' settings.\n\
126"), stdout);
127 emit_exec_status (PROGRAM_NAME);
128 emit_ancillary_info (PROGRAM_NAME);
129 }
130 exit (status);
131}
132
133/* argv[0] can be anything really, but generally it contains
134 the path to the executable or just a name if it was executed

Callers 1

mainFunction · 0.70

Calls 3

emit_mandatory_arg_noteFunction · 0.85
emit_exec_statusFunction · 0.85
emit_ancillary_infoFunction · 0.85

Tested by

no test coverage detected