bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24858: URGENT: Question about grep


From: Bruce Dubbs
Subject: bug#24858: URGENT: Question about grep
Date: Wed, 2 Nov 2016 10:52:39 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39

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

[Prev in Thread] Current Thread [Next in Thread]