I have a set of data that looks like this:
NK.Chr1:75500000-95000000:28960-29007 NG-unitig0655 97.872 47 1 0 1 47 121009 120963 2.90e-14 80.6
NK.Chr1:75500000-95000000:28960-29007 NG-1DRT-unitig0549 97.872 47 1 0 1 47 623680 623726 2.90e-14 80.6
NK.Chr1:75500000-95000000:28960-29007 NG-1DRT-unitig0278 97.872 47 1 0 1 47 1224581 1224627 2.90e-14 80.6
NK.Chr1:75500000-95000000:28960-29007 NG-1DRT-Chr4 97.872 47 1 0 1 47 8416368 8416414 2.90e-14 80.6
NK.Chr1:75500000-95000000:28960-29007 NG-1DRT-Chr4 97.872 47 1 0 1 47 20041035 20041081 2.90e-14 80.6
NK.Chr1:75500000-95000000:28960-29007 NG-1DRT-Chr4 97.872 47 1 0 1 47 35175472 35175426 2.90e-14 80.6
NK.Chr1:75500000-95000000:28960-29007 NG-1DRT-Chr4 97.872 47 1 0 1 47 56460095 56460049 2.90e-14 80.6
I need to filter the lines in the range of 0-3900000, considering only the numbers before NG.
grep 'NK.Chr1:75500000-95000000:[0-3900000]' NG.1DRT-blast.out > chr1-blast-NG.txt
I tried this code, but it returned all the lines with NK.Chr1:75500000-95000000:
, not considering the range.
Anyone knows how to build a proper code for it?
Here
[0-3900000]
is treated as a regular expression, which means any character between0
and3
(0
,1
,2
,3
), or9
.