Skip to main content
edited tags
Link
αғsнιη
  • 41.9k
  • 17
  • 75
  • 117
added 30 characters in body; edited tags; edited title
Source Link
αғsнιη
  • 41.9k
  • 17
  • 75
  • 117

Using Seq"seq", If one column is equal to 105, continue the other columcolumn

For example, I want to start from the far right column, and once that reaches 5, continue the count from the second farthest column.

0.0.0.0
0.0.0.1
0.0.0.2
0.0.0.3
0.0.0.4
0.0.0.5
0.0.1.5
0.0.2.5
0.0.3.5
and so on untill0.0.4.5
0.0.5.5
0.1.5.5
0.2.5.5
0.3.5.5
0.4.5.5
0.5.5.5
1.5.5.5
2.5.5.5
3.5.5.5
4.5.5.5
5.5.5.5

So far, I was thinking of using for i in seq( 0, 5), echo "0.0.0.$i":

for i in $(seq 0 5); do echo "0.0.0.$i"; done

and once i == 5i == 5, then well set i = 0i=0, and move the echo to the third position.

Using Seq, If one column is equal to 10, continue the other colum

For example, I want to start from the far right column, and once that reaches 5, continue the count from the second farthest column.

0.0.0.0
0.0.0.1
0.0.0.2
0.0.0.3
0.0.0.5
0.0.1.5
0.0.2.5
0.0.3.5
and so on untill
5.5.5.5

So far, I was thinking of using for i in seq( 0, 5), echo "0.0.0.$i" and once i == 5, then well set i = 0, and move the echo to the third position.

Using "seq", If one column is equal to 5, continue the other column

For example, I want to start from the far right column, and once that reaches 5, continue the count from the second farthest column.

0.0.0.0
0.0.0.1
0.0.0.2
0.0.0.3
0.0.0.4
0.0.0.5
0.0.1.5
0.0.2.5
0.0.3.5
0.0.4.5
0.0.5.5
0.1.5.5
0.2.5.5
0.3.5.5
0.4.5.5
0.5.5.5
1.5.5.5
2.5.5.5
3.5.5.5
4.5.5.5
5.5.5.5

So far, I was thinking of using:

for i in $(seq 0 5); do echo "0.0.0.$i"; done

and once i == 5, then well set i=0, and move the echo to the third position.

Source Link

Using Seq, If one column is equal to 10, continue the other colum

For example, I want to start from the far right column, and once that reaches 5, continue the count from the second farthest column.

0.0.0.0
0.0.0.1
0.0.0.2
0.0.0.3
0.0.0.5
0.0.1.5
0.0.2.5
0.0.3.5
and so on untill
5.5.5.5

So far, I was thinking of using for i in seq( 0, 5), echo "0.0.0.$i" and once i == 5, then well set i = 0, and move the echo to the third position.