logo

utils-std

Collection of commonly available Unix tools
commit: 7493e646eefa014772c64873565f5ff2dfbdd97b
parent 0bf3af8c46498990efcdc80e90a3cc1ce5f51501
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed,  1 Nov 2023 07:42:44 +0100

cmd/cat.1: Add some examples

Diffstat:

Mcmd/cat.118++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/cmd/cat.1 b/cmd/cat.1 @@ -27,6 +27,24 @@ The option is ignored, present only for POSIX compatibility. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +.Bl -tag -width Ds +.It Ql cat file1 - file2 - file3 +Print the contents of +.Ar file1 ; +then copy standard input until EOF (^D) is received; +then print the contents of +.Ar file2 ; +then the rest of standard input until EOF (^D) is received again; +finally +.Nm +will print the contents of +.Ar file3 . +Note that when standard input refers to a file, the second dash +does nothing as there isn't any remaining data to print. +.It Ql time cat +Get a stopwatch utility which stops once EOF is pressed. +.El .Sh STANDARDS .Nm is mostly compliant with the