coreutils

General Software Utilities
git clone http://git.omkov.net/coreutils
Log | Tree | Refs | README | LICENCE | Download

AuthorJamozed <[email protected]>
Date2020-08-14 04:29:58
Commite0a0c53011812c5232f4df510614ff79bcd0963e
Parent7c8ef2661e7a929e26d7657119f4f3fdf032dd97

echo: Document escape sequences in manpage

Diffstat

M man/echo.1 | 43 ++++++++++++++++++++++++++++++++++++-------
M src/echo.c | 3 ---

2 files changed, 36 insertions, 10 deletions

diff --git a/man/echo.1 b/man/echo.1
index 9d33dd3..df8cad1 100644
--- a/man/echo.1
+++ b/man/echo.1
@@ -1,19 +1,48 @@
-.TH ECHO 1 2020-06-26 "OMKOV coreutils" "General Commands Manual"
+.TH ECHO 1 2020-08-14 "OMKOV coreutils" "General Commands Manual"
 .SH NAME
 echo \(em write arguments to standard output
 .SH SYNOPSYS
 \fBecho\fR [\fIstring\fR...]
 .SH DESCRIPTION
 Write arguments to standard output, seperated by a single space and followed by
-a newline.
+a newline. If no arguments are given, only the newline is written.
 .SH OPERANDS
 The following operand is supported:
-.TP
-.I string
+.IP "\fIstring\fR" 8
 A string to be written to standard output.
-.SH STANDARDS
-The \fIecho\fR utility is compliant with the IEEE Std 1003.2-1992 ("POSIX.2")
-specification.
+.RS 8
+.PP
+The following character sequences are supported within any argument:
+.TP 8
+\\a
+Write an alert.
+.TP 8
+\\b
+Write a backspce.
+.TP 8
+\\c
+Suppress the final newline. All characters following the '\\c' are ignored.
+.TP 8
+\\f
+Write a form feed.
+.TP 8
+\\n
+Write a newline.
+.TP 8
+\\r
+Write a carriage return.
+.TP 8
+\\t
+Write a tab.
+.TP 8
+\\v
+Write a vertical tab.
+.TP 8
+\\\\
+Write a backslash.
+.TP 8
+\\0\fInum\fR
+Write an 8-bit value that is the zero to three digit octal number \fInum\fR.
 .SH COPYRIGHT
 .nf
 Copyright (C) 2020, Jakob Wakeling
diff --git a/src/echo.c b/src/echo.c
index 71b6f08..f0dc755 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -6,9 +6,6 @@
 /*
 OMKOV Permissive Licence, version 1.0
 
-Copyright (C) 2020, Jakob Wakeling
-All rights reserved.
-
 Permission is hereby granted, free of charge, to any person obtaining a copy of
 this software and associated documentation files (the "Software"), to deal with
 the Software without restriction, including without limitation the rights to