The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
145 views

Seq performance hit when specifying a format string

Running seq (GNU coreutils 8.21) without specifying a format string runs extremely quickly compared with any possible format I tried: $ time seq 1e8 > /dev/null seq 1e8 > /dev/null 0.68s ...
5
votes
8answers
425 views

Generate two sequences of numbers separated by “|”

I'm using bash (CentOS 5) and looking to generate this output (I assume I could use seq or echo together maybe?): 1|1, 2|2, 3|3, .... 31|31, 32|32, 33|33, I googled seq examples for over two hours ...
0
votes
2answers
44 views

seq -w equivalent in os-x bash

I have sub-folders named 00 01 02, ... n with each foldername containing at least 2 digits. I need to access these sub-folders in os-x terminal. The command for i in $(seq -w 00 06); do echo $i; done ...
3
votes
5answers
2k views

Bash - Sequence of numbers in the same line

I know the command seq to generate sequence of integers, one per line, but I would like to ask two questions: Is it possible to write the numbers of the sequence in the same line? Is it possible to ...
3
votes
3answers
51 views

printing a series of characters

My ultimate goal here is to generate a block of text that can be used to test out various fonts at a terminal. I want to generate the file as basically an ascii chart. A series of characters from 1 ...
2
votes
2answers
236 views

How can I copy and move a sequential subset of files?

I have a directory containing 1772 files named PRC0001, PRC002,... up to PRC1772. How can I copy a subset, for example PRC0257 to PRC1516 to a different directory? I am trying to do this for several ...
0
votes
2answers
406 views

Can I use seq to go from 001 to 999? [duplicate]

Can I use seq to go from 001 to 999?
5
votes
1answer
232 views

`seq` and bash brace expansion failing

IINM my system is failing when bashing for i in {0..10000000}; # Seven zeroes. do false; done # `bash` exited and its `tmux` pane/window was closed. or for i in $(seq 0 10000000); # ...
7
votes
5answers
903 views

How to randomize the output from seq?

I know I can use seq to generate a random list of numbers: 1, 2, 3, 4... I want to get those numbers into a random order like 3, 1, 4, 2... I know I can use shuf to shuffle the lines of a file. So I ...
20
votes
6answers
12k views

How to display numbers in reverse order using seq(1)?

I have iterate over numbers in various order. I am able to display them in increasing order, even with steps like: $ seq --separator="," 1 10 1,2,3,4,5,6,7,8,9,10 $ seq --separator="," 1 2 10 ...
1
vote
1answer
2k views

seq - invalid floating point argument error

I have a file with many numbers, with each number on one line. My goal is to find the numbers that are missing. I'm trying to generate the sequence of all the numbers with seq start=$(head -1 ...
3
votes
6answers
1k views

Add consecutive numbers succintly and elegantly to index lines

I usually do this $ wc questions 33 36 3105 questions $ seq 1 33 > nums $ paste nums questions 1 Content 2 ... . . 33 End Content but I feel there could be faster way to do ...