blob: 186959c76a7d715a887d0972a86bf3e8c0910a08 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>s6-portable-utils: the s6-seq program</title>
<meta name="Description" content="s6-portable-utils: the s6-seq program" />
<meta name="Keywords" content="s6-portable-utils command s6-seq seq numbers loop" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">s6-portable-utils</a><br />
<a href="//skarnet.org/software/">Software</a><br />
<a href="//skarnet.org/">skarnet.org</a>
</p>
<h1> The <tt>s6-seq</tt> program </h1>
<p>
s6-seq prints a sequence of numbers.
</p>
<h2> Interface </h2>
<pre>
s6-seq [ -w ] [ -s separator ] <em>limits</em>
</pre>
<ul>
<li> <em>limits</em> can be one, two or three arguments.
<ul>
<li> Three arguments are interpreted as <em>first</em>,
<em>increment</em> and <em>last</em>, in this order. </li>
<li> Two arguments are interpreted as <em>first</em> and
<em>last</em>, and <em>increment</em> defaults to 1. </li>
<li> One argument is interpreted as <em>last</em>, and
<em>first</em> and <em>increment</em> both default to 1. </li>
</ul> </li>
<li> s6-seq prints all unsigned integers from <em>first</em>
to <em>last</em> inclusive, with a step of <em>increment</em>,
with a newline after each integer.
It then exits 0. </li>
</ul>
<h2> Options </h2>
<ul>
<li> <tt>-w</tt> : fixed width. The numbers will all be printed
with the same width; smaller numbers will have leading <tt>0</tt>
characters. </li>
<li> <tt>-s</tt> <em>sep</em> : print <em>sep</em> after
each number. Default is a newline. If <em>sep</em>
is the empty string, a null character will be printed. </li>
</ul>
<h2> Notes </h2>
<p>
s6-seq is similar to the GNU <tt>seq</tt> program. However, it
does not handle negative numbers, floating point numbers or
printf-style formatting.
</p>
</body>
</html>
|