usage: seq [options] ... Mantissa
or: seq [options] ... First number mantissa
or: seq [options] ... The first number increment mantissa
Prints the number to the mantissa starting with the specified increment from the first number.
-f,--format= format uses the printf-style floating-point format
-s,--separator= string separates numbers by using the specified string (default: \ n)
-w,--equal-width add 0 before column to make the same width
--help Display this help message and exit
--version display version information and exit
If first or increment is omitted, the default value is 1. Even then the mantissa is still less than the first number. The
first, increment, and mantissa are interpreted as floating-point numbers. When the first number is less than the mantissa, the increment is generally positive, and the
opposite is generally negative when the first number is greater than the mantissa. The format specified by the
must apply to parameters that display the type "double", which defaults to "%. Precision F" When the first number, increment, and mantissa are the fixed-point decimal numbers of the specified
precision. Otherwise the default is "%g".
two ways to loop from 1 to 100 (bash other shells have not tried)
for x in ' seq 1 ';d o echo $x;d one
for x in {1..100};d o echo $x;d one
output 1-10 0, number not containing the number 7, and cannot be divisible by 7
Seq | grep-v "7" | awk ' $0%7!=0{print} '
In addition, you can do this without SEQ:
[[Email protected]]# for i in {1..10};d o echo $i;d one
Between 1 and 10 is a two-half-corner point.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Summary of usage of SEQ in shell