Greta wrote:
Dear grep developer,

I am Greta Romano and I need your help as soon as possibile.

I want to use grep command to search a string of 6 characters in every
line of a file (biological file with DNA nucleotide).

The problem is that I need to search these 6 characters in the first 30
characters of each line. I report you an example:

String to search: GTGTCA

File:

 >HWI-ST740:1:C2GCJACXX:1:1101:1279:1825 1:N:0:
_/NGACGCTCTGACCTTGGGGCTGGTCGGGG/__A_TGCTGAGGAGACGGTGACCAGGGTTCCCTGGCCCCACANNNCCAAGCTTCCNNNNNNNNNNNNNNNNNNN

 >HWI-ST740:1:C2GCJACXX:1:1101:1349:1847 1:N:0:
_/NTTAGATGAGGGAAACATCTGCATCAAGTT/__G_TTTATCTGTGACAACAAGTGTTGTTCCACTGCCAAAGAGTTTCTTATAATAAAACAATCGGGGTGGCACNNNNN


I want that the research is done only in the underline characters.  So
what I have to add in grep command to put the limit of 30 characters?

cut -c 30 filename | grep ACGTAC

  -- Bruce





Reply via email to