<p>I am trying to scan blocks lets say from 1 to 10.</p>
<p>lets say</p>
<p><strong>(3,1,4,8,2,7,9,10)</strong></p>
<p>min block = 1 , max block = 10</p>
<p>expected sequence = 1 to 10</p>
<p><em><strong>missing blocks= 5,6</strong></em></p>
<p>I need a shell script that is going to pick up the missing block in the range and add them to create a new set. Sorting is not needed though</p>
<p>Best Regards,</p>

CC BY-SA 4.0
2022-03-18T07:09:41.733Z
I’m voting to close this question because it is unrelated to Bitcoin.
Pieter Wuille
CC BY-SA 4.0
2022-03-18T07:27:59.457Z
@PieterWuille, I just modified my question. I am trying to scan the bitcoin blockchain and filter out transactions based upon the addresses that belong to me. I am missing some blocks.
Abdul Rehman Rajput
CC BY-SA 4.0
2022-03-18T10:31:50.887Z
This seems to be a question about shell-scripting. You can probably ask on [stack overflow](https://stackoverflow.com/questions/tagged/bash) about how to find missing numbers in an unordered list. In any case, you should post the shell-script you have written so far, or a simplified version, and explain how it's output differs from what you need.
RedGrittyBrick
CC BY-SA 4.0
2022-03-18T10:46:13.150Z
@RedGrittyBrick That is fine ! Here is another question that was answered https://stackoverflow.com/questions/2727809/finding-the-missing-values-in-a-range-using-any-scripting-language-perl-pytho ? What is the bias for ? I can still find a solution to the problem but the responses don't encourage to post questions anymore
Abdul Rehman Rajput
CC BY-SA 4.0
2022-03-18T15:37:50.837Z
You are more likely to find an answer about subject X on a site that has large numbers of visitors with experience in subject X than you will on a site about subject A which only occasionally involves the use of something from subject X. It is an attempt to be helpful
RedGrittyBrick
<linux><bash>
Shell Script - Block Sequence check and add missing block
Abdul Rehman Rajput
# Shell Script - Block Sequence check and add missing block

(Asked by: username_0 on 2022-03-18)

I am trying to scan blocks lets say from 1 to 10.

lets say

**(3,1,4,8,2,7,9,10)**

min block = 1 , max block = 10

expected sequence = 1 to 10

***missing blocks= 5,6***

I need a shell script that is going to pick up the missing block in the range and add them to create a new set. Sorting is not needed though

Best Regards,

**Tags:** linux, bash

> **Comments:**
> **username_1**: I’m voting to close this question because it is unrelated to Bitcoin.  
> **username_0**: @username_1, I just modified my question. I am trying to scan the bitcoin blockchain and filter out transactions based upon the addresses that belong to me. I am missing some blocks.  
> **username_2**: This seems to be a question about shell-scripting. You can probably ask on [stack overflow](https://stackoverflow.com/questions/tagged/bash) about how to find missing numbers in an unordered list. In any case, you should post the shell-script you have written so far, or a simplified version, and explain how it's output differs from what you need.  
> **username_0**: @username_2 That is fine ! Here is another question that was answered https://stackoverflow.com/questions/2727809/finding-the-missing-values-in-a-range-using-any-scripting-language-perl-pytho ? What is the bias for ? I can still find a solution to the problem but the responses don't encourage to post questions anymore  
> **username_2**: You are more likely to find an answer about subject X on a site that has large numbers of visitors with experience in subject X than you will on a site about subject A which only occasionally involves the use of something from subject X. It is an attempt to be helpful  

---

## 0 answers

