[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 05/10: HACKING: Tighten example of `seq` replacement.
From: |
G. Branden Robinson |
Subject: |
[groff] 05/10: HACKING: Tighten example of `seq` replacement. |
Date: |
Fri, 26 May 2023 11:55:40 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 47d5846631c99ea5ad85e45b0318805faffb7971
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu May 25 03:25:25 2023 -0500
HACKING: Tighten example of `seq` replacement.
---
HACKING | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/HACKING b/HACKING
index f34c71a1f..3e1b9fd2d 100644
--- a/HACKING
+++ b/HACKING
@@ -85,11 +85,8 @@ Here are some portability notes on writing automated tests.
* The GNU coreutils "seq" command is handy but not standardized by
POSIX. Replace it with a while loop.
- seq 53
- n=1; while [ $n -le 53 ]; do echo $n; n=$(( n + 1 )); done
-
- "unset" is supported by POSIX-conformant shell; use it to remove
- temporary shell variables after use.
+ # emulate "seq 53"
+ n=1; while [ $n -le 53 ]; do echo $n; n=$(( n + 1 )); done; unset n
* The "od" command on macOS can put extra space characters (i.e., spaces
that don't correspond to the input) at the ends of lines when using
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 05/10: HACKING: Tighten example of `seq` replacement.,
G. Branden Robinson <=