SEQ Command Summary

Source: Internet
Author: User

Seq Command Summary

Example One:
# seq 1 10
The result is 1 4 5 6 7 8 9
Example Two:
#!/bin/bash
For i in ' seq 1 10 ';
Do
echo $i;
Done
or with
For I in $ (SEQ 1 10)
can also

Seq
-F,--format=format use printf style Floating-pointformat (default:%g)
-S,--separator=string use stringto separate numbers (default: \ n)
-W,--equal-width equalize width by padding with leading zeroes
- F options Specify Format

#seq-F "%3g" 911
9
10
11
% The number of digits following the specified number is "%g" by default .
"%3g" then the number of digits is less than the space
#sed-F "%03g" 9 In this case, the low number of digits is 0.
% make string earlier
Seq-f "STR%03G" 9 11
str009
str010
str011
- W specifies that the output number is equal to the width cannot be used with-f
Seq-w-F "str%03g" 9 11
Seq:format string May is specified whenprinting equal width strings
SEQ-W 98 101
098
099
100
101
the output is the same width
- s specifies that the delimiter is carriage return by default
Seq-s ""-F "str%03g" 9 11
str009 str010 str011
to specify \ t as the separator symbol
Seq-s "' Echo-e" \ T "'" 911
specify \ n as the separator symbol
Seq-s "' Echo-e" \ n "'" 911
19293949596979899910911


Seq Command Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.