]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: use consistent references to standard files
authorPádraig Brady <P@draigBrady.com>
Mon, 28 Jul 2025 10:05:25 +0000 (11:05 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 29 Jul 2025 10:43:09 +0000 (11:43 +0100)
* cfg.mk (sc_standard_outputs): A new syntax check to
enforce standard references.
* doc/coreutils.texi: s/stderr/standard error/ etc.
* src/date.c: Likewise.
* src/dd.c: Likewise.
* src/env.c: Likewise.
* src/sort.c: Likewise.
* src/split.c: Likewise.
* src/stty.c: Likewise.
* src/timeout.c: Likewise.
* src/who.c: Likewise.

cfg.mk
doc/coreutils.texi
src/date.c
src/dd.c
src/env.c
src/sort.c
src/split.c
src/stty.c
src/timeout.c
src/who.c

diff --git a/cfg.mk b/cfg.mk
index 56c70f244d2205ded8685b54a33577402699e373..eecec2d727a1a1235d79fa0aee96a929412ef317 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -336,6 +336,12 @@ sc_long_lines:
          sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)';              \
        done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
 
+sc_standard_outputs: $(ALL_MANS)
+       @grep -E 'std(in|out|err)' man/*.1 doc/*.texi                    \
+         && { echo 1>&2 '$@: use "standard ....." in user docs'; exit 1; } || :
+       @grep -E '[Ss]tandard (in|out|err)([^op]|$$)' man/*.1 doc/*.texi \
+         && { echo 1>&2 '$@: use "standard ..put" in user docs'; exit 1; } || :
+
 # Option descriptions should not start with a capital letter.
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
index 7ca5b222c6167592d136daacf8103fb49f1acca3..40ecf3126f7c27f8ee550e9ec760083e00b50251 100644 (file)
@@ -3415,13 +3415,17 @@ with names @file{big-aa.xz}, @file{big-ab.xz}, @file{big-ac.xz}, etc.
 
 Split @var{input} to @var{chunks} output files where @var{chunks} may be:
 
+@macro Stdout
+standard output
+@end macro
+
 @example
 @var{n}      generate @var{n} files based on current size of @var{input}
 @var{k}/@var{n}    output only @var{k}th of @var{n} to standard output
 l/@var{n}    generate @var{n} files without splitting lines or records
-l/@var{k}/@var{n}  likewise but output only @var{k}th of @var{n} to stdout
+l/@var{k}/@var{n}  likewise but output only @var{k}th of @var{n} to @Stdout
 r/@var{n}    like @samp{l} but use round robin distribution
-r/@var{k}/@var{n}  likewise but output only @var{k}th of @var{n} to stdout
+r/@var{k}/@var{n}  likewise but output only @var{k}th of @var{n} to @Stdout
 @end example
 
 If the input size is not a multiple of @var{n}, early output files are
@@ -4147,7 +4151,8 @@ input digest string as what is output.  I.e., removing or adding any
 
 @item --debug
 @opindex --debug
-Output extra information to stderr, like the checksum implementation being used.
+Output extra information to standard error,
+like the checksum implementation being used.
 
 @macro cksumLengthOption
 @item -l
@@ -9056,7 +9061,7 @@ Equivalent to @option{--no-dereference --preserve=links}.
 @item --debug
 @opindex --debug
 @cindex debugging, copying
-Print extra information to stdout, explaining how files are copied.
+Print extra information to standard output, explaining how files are copied.
 This option implies the @option{--verbose} option.
 @end macro
 @optDebugCopy
index 95396282010c316ff0acc4c0be220da994f270d6..6979399c3c21856c5c8432cd10423682429921d3 100644 (file)
@@ -143,8 +143,8 @@ With -s, or with [MMDDhhmm[[CC]YY][.ss]], set the date and time.\n\
   -d, --date=STRING          display time described by STRING, not 'now'\n\
 "), stdout);
       fputs (_("\
-      --debug                annotate the parsed date,\n\
-                              and warn about questionable usage to stderr\n\
+      --debug                annotate the parsed date, and\n\
+                              warn about questionable usage to standard error\n\
 "), stdout);
       fputs (_("\
   -f, --file=DATEFILE        like --date; once for each line of DATEFILE\n\
index c479f4cca2e9959bdaa36984a116c04619359c47..33959b4952c9259c39882aefffbe4c708e984fbd 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -550,14 +550,14 @@ Copy a file, converting and formatting according to the operands.\n\
   ibs=BYTES       read up to BYTES bytes at a time (default: 512)\n\
 "), stdout);
       fputs (_("\
-  if=FILE         read from FILE instead of stdin\n\
+  if=FILE         read from FILE instead of standard input\n\
   iflag=FLAGS     read as per the comma separated symbol list\n\
   obs=BYTES       write BYTES bytes at a time (default: 512)\n\
-  of=FILE         write to FILE instead of stdout\n\
+  of=FILE         write to FILE instead of standard output\n\
   oflag=FLAGS     write as per the comma separated symbol list\n\
   seek=N          (or oseek=N) skip N obs-sized output blocks\n\
   skip=N          (or iseek=N) skip N ibs-sized input blocks\n\
-  status=LEVEL    The LEVEL of information to print to stderr;\n\
+  status=LEVEL    The LEVEL of information to print to standard error;\n\
                   'none' suppresses everything but error messages,\n\
                   'noxfer' suppresses the final transfer statistics,\n\
                   'progress' shows periodic transfer statistics\n\
index 17254c303e3bc4a547d2120b7b17aaafca97c8ff..baa1e1372d52dbad0529e4a5182538cf196d15b3 100644 (file)
--- a/src/env.c
+++ b/src/env.c
@@ -144,7 +144,8 @@ Set each NAME to VALUE in the environment and run COMMAND.\n\
       --ignore-signal[=SIG]   set handling of SIG signal(s) to do nothing\n\
 "), stdout);
       fputs (_("\
-      --list-signal-handling  list non default signal handling to stderr\n\
+      --list-signal-handling  list non default signal handling to \
+standard error\n\
 "), stdout);
       fputs (_("\
   -v, --debug          print verbose information for each processing step\n\
index 4a1fdfd3751e1c309d343566010007656f769b95..7f1b51dd55d38cde3fed8c2ad8ee6019f6b76886 100644 (file)
@@ -477,8 +477,8 @@ Other options:\n\
                               decompress them with PROG -d\n\
 "), stdout);
       fputs (_("\
-      --debug               annotate the part of the line used to sort,\n\
-                              and warn about questionable usage to stderr\n\
+      --debug               annotate the part of the line used to sort, and\n\
+                              warn about questionable usage to standard error\n\
       --files0-from=F       read input from the files specified by\n\
                             NUL-terminated names in file F;\n\
                             If F is - then read names from standard input\n\
index 9cbbcccd1eedb06b68b1b214a34ca1029081324a..22a83ad5c879502142926ff1cde03e5348154cba 100644 (file)
@@ -262,11 +262,11 @@ default size is 1000 lines, and default PREFIX is 'x'.\n\
       fputs (_("\n\
 CHUNKS may be:\n\
   N       split into N files based on size of input\n\
-  K/N     output Kth of N to stdout\n\
+  K/N     output Kth of N to standard output\n\
   l/N     split into N files without splitting lines/records\n\
-  l/K/N   output Kth of N to stdout without splitting lines/records\n\
+  l/K/N   output Kth of N to standard output without splitting lines/records\n\
   r/N     like 'l' but use round robin distribution\n\
-  r/K/N   likewise but only output Kth of N to stdout\n\
+  r/K/N   likewise but only output Kth of N to standard output\n\
 "), stdout);
       emit_ancillary_info (PROGRAM_NAME);
     }
index 0163ea48aa4a922149933a38558d8c2ae869cc2f..3b2469a9b2dd5a08976f2899b761b5b49a46044f 100644 (file)
@@ -19,7 +19,7 @@
    Options:
    -a, --all    Write all current settings to stdout in human-readable form.
    -g, --save   Write all current settings to stdout in stty-readable form.
-   -F, --file   Open and use the specified device instead of stdin
+   -F, --file   Open and use the specified device instead of standard input.
 
    If no args are given, write to stdout the baud rate and settings that
    have been changed from their defaults.  Mode reading and changes
@@ -557,7 +557,7 @@ Print or change terminal characteristics.\n\
       fputs (_("\
   -a, --all          print all current settings in human-readable form\n\
   -g, --save         print all current settings in a stty-readable form\n\
-  -F, --file=DEVICE  open and use the specified DEVICE instead of stdin\n\
+  -F, --file=DEVICE  open and use DEVICE instead of standard input\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
index b8df73b1f9ac306f584b5c36f1428b5647bbfc21..cc3b1b0849674fb12c9ce153de02bc669dbc948d 100644 (file)
@@ -285,7 +285,7 @@ Start COMMAND, and kill it if still running after DURATION.\n\
                    see 'kill -l' for a list of signals\n\
 "), stdout);
       fputs (_("\
-  -v, --verbose  diagnose to stderr any signal sent upon timeout\n\
+  -v, --verbose  diagnose to standard error any signal sent upon timeout\n\
 "), stdout);
 
       fputs (HELP_OPTION_DESCRIPTION, stdout);
index 17c1e34acfcdc539676cd39e1897e6b2acd79111..b481dd2f82a1bb137dff2dd4898e49ab87983b1a 100644 (file)
--- a/src/who.c
+++ b/src/who.c
@@ -648,7 +648,7 @@ Print information about users who are currently logged in.\n\
 "), stdout);
       fputs (_("\
       --lookup      attempt to canonicalize hostnames via DNS\n\
-  -m                only hostname and user associated with stdin\n\
+  -m                only hostname and user associated with standard input\n\
   -p, --process     print active processes spawned by init\n\
 "), stdout);
       fputs (_("\