Commit Graph

10 Commits

Author SHA1 Message Date
cem
551738280d seq(1): Require user-provided format strings to contain a conversion
This matches GNU seq, for example.

For users that are looking for similar functionality, 'jot -b foo N' will
print 'foo' N times.  See jot(1).

PR:		236347
Reported by:	<y AT maya.st>
Sponsored by:	Dell EMC Isilon
2019-03-07 18:24:16 +00:00
kevans
2d247da0e4 seq(1): Move long_opts up with globals 2018-05-02 01:04:13 +00:00
kevans
d8b709f60e seq(1): Provide some long options
These match GNU seq(1) names where applicable for compatibility purposes.

MFC after:	1 month
2018-04-30 18:55:01 +00:00
cem
4956af63b1 seq(1): Consistently include 'last' for non-integers
The source of error is a rounded increment being too large and thus the loop
steps slightly past 'last'.  Perform a final comparison using the formatted
string values (truncated precision) to determine if we still need to print
the 'last' value.

PR:		217149
Submitted by:	Fernando Apesteguía <fernando.apesteguia AT gmail.com>,
		Yuri Pankov <yuripv AT icloud.com> (earlier version)
Reported by:	Martijn Dekker <mcdutchie AT hotmail.com>
Sponsored by:	Dell EMC Isilon
2018-02-27 22:01:40 +00:00
pfg
7551d83c35 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
delphij
98cd3a89e5 Sync with NetBSD, mainly address NetBSD bug #43355:
Fix valid_format() to be more careful about allowing only valid
printf formats.

Obtained from:	NetBSD
MFC after:	2 weeks
2014-12-18 20:23:19 +00:00
ed
5d85b35609 Add missing static keywords to seq(1) 2011-11-06 08:17:05 +00:00
brucec
696c4e1f9b Fix typos.
PR:	bin/148894
Submitted by:	olgeni
2010-11-09 10:59:09 +00:00
delphij
5c6008ca2a Treat numbers after [Ee] a positive number rather than an invalid
one.
2010-02-20 01:23:15 +00:00
delphij
baab66ca0e Add seq(1), a small utility to generate sequence number.
Obtained from:	NetBSD
MFC after:	3 months
2010-02-19 23:54:12 +00:00