[BACK]Return to seq.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / seq

Annotation of src/usr.bin/seq/seq.1, Revision 1.1

1.1     ! millert     1: .\"    $OpenBSD$
        !             2: .\"
        !             3: .\" Copyright (c) 2005 The NetBSD Foundation, Inc.
        !             4: .\" All rights reserved.
        !             5: .\"
        !             6: .\" This code is derived from software contributed to The NetBSD Foundation
        !             7: .\" by Brian Ginsbach.
        !             8: .\"
        !             9: .\" Redistribution and use in source and binary forms, with or without
        !            10: .\" modification, are permitted provided that the following conditions
        !            11: .\" are met:
        !            12: .\" 1. Redistributions of source code must retain the above copyright
        !            13: .\"    notice, this list of conditions and the following disclaimer.
        !            14: .\" 2. Redistributions in binary form must reproduce the above copyright
        !            15: .\"    notice, this list of conditions and the following disclaimer in the
        !            16: .\"    documentation and/or other materials provided with the distribution.
        !            17: .\"
        !            18: .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
        !            19: .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
        !            20: .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
        !            21: .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
        !            22: .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
        !            23: .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
        !            24: .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
        !            25: .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
        !            26: .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
        !            27: .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
        !            28: .\" POSSIBILITY OF SUCH DAMAGE.
        !            29: .\"
        !            30: .Dd $Mdocdate$
        !            31: .Dt SEQ 1
        !            32: .Os
        !            33: .Sh NAME
        !            34: .Nm seq
        !            35: .Nd print sequences of numbers
        !            36: .Sh SYNOPSIS
        !            37: .Nm
        !            38: .Op Fl w
        !            39: .Op Fl f Ar format
        !            40: .Op Fl s Ar string
        !            41: .Op Ar first Op Ar incr
        !            42: .Ar last
        !            43: .Sh DESCRIPTION
        !            44: The
        !            45: .Nm
        !            46: utility prints a sequence of numbers, one per line
        !            47: .Pq default ,
        !            48: from
        !            49: .Ar first
        !            50: .Pq default 1 ,
        !            51: to near
        !            52: .Ar last
        !            53: as possible, in increments of
        !            54: .Ar incr
        !            55: .Pq default 1 .
        !            56: When
        !            57: .Ar first
        !            58: is larger than
        !            59: .Ar last ,
        !            60: the default
        !            61: .Ar incr
        !            62: is -1.
        !            63: .Pp
        !            64: All numbers are interpreted as floating point.
        !            65: .Pp
        !            66: Normally, integer values are printed as decimal integers.
        !            67: .Pp
        !            68: The
        !            69: .Nm
        !            70: utility accepts the following options:
        !            71: .Bl -tag -width Ar
        !            72: .It Fl f Ar format , Fl -format Ar format
        !            73: Use a
        !            74: .Xr printf 3
        !            75: style
        !            76: .Ar format
        !            77: to print each number.
        !            78: Only the
        !            79: .Cm A ,
        !            80: .Cm a ,
        !            81: .Cm E ,
        !            82: .Cm e ,
        !            83: .Cm F ,
        !            84: .Cm f ,
        !            85: .Cm G ,
        !            86: .Cm g ,
        !            87: and
        !            88: .Cm %
        !            89: conversion characters are valid, along with any optional
        !            90: flags and an optional numeric minimum field width or precision.
        !            91: The
        !            92: .Ar format
        !            93: can contain character escape sequences in backslash notation as
        !            94: defined in
        !            95: .St -ansiC .
        !            96: The default is
        !            97: .Cm %g .
        !            98: .It Fl s Ar string , Fl -separator Ar string
        !            99: Use
        !           100: .Ar string
        !           101: to separate numbers.
        !           102: The
        !           103: .Ar string
        !           104: can contain character escape sequences in backslash notation as
        !           105: defined in
        !           106: .St -ansiC .
        !           107: The default is
        !           108: .Cm \en .
        !           109: .It Fl w , Fl -fixed-width
        !           110: Equalize the widths of all numbers by padding with zeros as necessary.
        !           111: This option has no effect with the
        !           112: .Fl f
        !           113: option.
        !           114: If any sequence numbers will be printed in exponential notation,
        !           115: the default conversion is changed to
        !           116: .Cm %e .
        !           117: .It Fl -help
        !           118: Display the program usage and exit.
        !           119: .It Fl -version
        !           120: Display the verion number and exit.
        !           121: .El
        !           122: .Sh EXIT STATUS
        !           123: .Ex -std
        !           124: .Sh EXAMPLES
        !           125: Generate a sequence from 1 to 3 (inclusive) with a default increment of 1:
        !           126: .Bd -literal -offset indent
        !           127: # seq 1 3
        !           128: 1
        !           129: 2
        !           130: 3
        !           131: .Ed
        !           132: .Pp
        !           133: Generate a sequence from 3 to 1 (inclusive) with a default increment of -1:
        !           134: .Bd -literal -offset indent
        !           135: # seq 3 1
        !           136: 3
        !           137: 2
        !           138: 1
        !           139: .Ed
        !           140: .Pp
        !           141: Generate a sequence from 0 to 0.1 (inclusive) with an increment of 0.05 and padding
        !           142: with leading zeroes.
        !           143: .Bd -literal -offset indent
        !           144: # seq -w 0 .05 .1
        !           145: 0.00
        !           146: 0.05
        !           147: 0.10
        !           148: .Ed
        !           149: .Pp
        !           150: Generate a sequence from 1 to 3 (inclusive) with a default increment of 1,
        !           151: and a custom separator string:
        !           152: .Bd -literal -offset indent
        !           153: # seq -s " " 1 3
        !           154: 1 2 3
        !           155: .Ed
        !           156: .Pp
        !           157: Generate a sequence from 1 to 2 (inclusive) with an increment of 0.2 and
        !           158: print the results with two digits after the decimal point (using a
        !           159: .Xr printf 3
        !           160: style format):
        !           161: .Bd -literal -offset indent
        !           162: # seq -f %.2f 1 0.2 2
        !           163: 1.00
        !           164: 1.20
        !           165: 1.40
        !           166: 1.60
        !           167: 1.80
        !           168: 2.00
        !           169: .Ed
        !           170: .Sh SEE ALSO
        !           171: .Xr jot 1 ,
        !           172: .Xr printf 1 ,
        !           173: .Xr printf 3
        !           174: .Sh HISTORY
        !           175: A
        !           176: .Nm
        !           177: command appeared in
        !           178: .At v8 .
        !           179: This version of
        !           180: .Nm
        !           181: appeared in
        !           182: .Nx 3.0
        !           183: and was ported to
        !           184: .Ox 7.1 .
        !           185: It was based on the command of the same name in
        !           186: Plan 9 from Bell Labs and the GNU core utilities.
        !           187: The GNU
        !           188: .Nm
        !           189: command first appeared in the 1.13 shell utilities release.
        !           190: .Sh BUGS
        !           191: The
        !           192: .Fl w
        !           193: option does not handle the transition from pure floating point
        !           194: to exponent representation very well.
        !           195: The
        !           196: .Nm
        !           197: utility is not bug for bug compatible with other implementations.