Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/date date(1): Use .Dl for one-liners. Same output is ge...



details:   https://anonhg.NetBSD.org/src/rev/b11d9d3d029f
branches:  trunk
changeset: 366028:b11d9d3d029f
user:      uwe <uwe%NetBSD.org@localhost>
date:      Tue May 10 09:07:57 2022 +0000

description:
date(1): Use .Dl for one-liners.  Same output is generated.

diffstat:

 bin/date/date.1 |  27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

diffs (66 lines):

diff -r e87a7302dedc -r b11d9d3d029f bin/date/date.1
--- a/bin/date/date.1   Tue May 10 09:05:03 2022 +0000
+++ b/bin/date/date.1   Tue May 10 09:07:57 2022 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: date.1,v 1.49 2022/05/10 09:00:39 uwe Exp $
+.\"    $NetBSD: date.1,v 1.50 2022/05/10 09:07:57 uwe Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -112,9 +112,8 @@
 A <newline> character is always output after the characters
 specified by the format string.
 The format string for the default display is:
-.Bd -literal -offset indent
-%a %b %e %H:%M:%S %Z %Y
-.Ed
+.Pp
+.Dl %a %b %e %H:%M:%S %Z %Y
 .Pp
 If an operand does not have a leading plus sign, it is interpreted as
 a value for setting the system's notion of the current date and time.
@@ -189,9 +188,8 @@
 .Pa /usr/share/zoneinfo/posixrules .
 .Sh EXAMPLES
 The command:
-.Bd -literal -offset indent
-date '+DATE: %m/%d/%y%nTIME: %H:%M:%S'
-.Ed
+.Pp
+.Dl date '+DATE: %m/%d/%y%nTIME: %H:%M:%S'
 .Pp
 will display:
 .Bd -literal -offset indent
@@ -200,26 +198,23 @@
 .Ed
 .Pp
 The command:
-.Bd -literal -offset indent
-date 8506131627
-.Ed
+.Pp
+.Dl date 8506131627
 .Pp
 sets the date to
 .Dq Li "June 13, 1985, 4:27 PM" .
 .Pp
 The command:
-.Bd -literal -offset indent
-date 1432
-.Ed
+.Pp
+.Dl date 1432
 .Pp
 sets the time to
 .Li "2:32 PM" ,
 without modifying the date.
 .Pp
 The command:
-.Bd -literal -offset indent
-date +%s
-.Ed
+.Pp
+.Dl date +%s
 .Pp
 prints the current time as seconds since the Epoch.
 .Sh DIAGNOSTICS



Home | Main Index | Thread Index | Old Index