Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 28th May 2012, 07:03 AM
papori Offline
Registered User
 
Join Date: Nov 2010
Posts: 58
linuxfedorafirefox
How to select only the line that after pattern?

Hi all,
Assuming i have this text:
@HISEQ1:1360NU8ACXX:5:1101:4153:1981 1:N:0:ACTTGA
ATTGCAATACTAACTGTGACTCAACTGAGGAGTTAAGATGTANNNNNNNN
+
CCCFFFFFHHHHHJJJJJJJJJJIJIA<CCC2111:EGH?1?:?DHHIGI
@HISEQ1:1360NU8ACXX:5:1101:4876:1982 1:N:0:ACTTGA
ATCATCCTTCTTCATTTCTGGGGGTTTGTCTGGTTTCAGAGGAGCTGCTT
+
CCCFFFFFHHHHHIJJJJJJJJ@<1??GHII:002?DHGGHFHIIIIHHI
@HISEQ1:1360NU8ACXX:5:1101:4876:1982 1:N:0:ACTTGA
ATCATCCTTCTTCATTTCTGGGGGTTTGTCTGGTTTCAGAGGAGCTGCTT
+
CCCFFFFFHHHHHIJJJJJJJJ@<1??GHII:002?DHGGHFHIIIIHHI
@HISEQ1:1360NU8ACXX:5:1101:4876:1982 1:N:0:ACTTGA
ATCATCCTTCTTCATTTCTGGGGGTTTGTCTGGTTTCAGAGGAGCTGCTT
+
CCCFFFFFHHHHHIJJJJJJJJ@<1??GHII:002?DHGGHFHIIIIHHI

i want to select only the first line after "@HISEQ" in all the file.
in this example the output should be :
ATTGCAATACTAACTGTGACTCAACTGAGGAGTTAAGATGTANNNNNNNN
ATCATCCTTCTTCATTTCTGGGGGTTTGTCTGGTTTCAGAGGAGCTGCTT
ATCATCCTTCTTCATTTCTGGGGGTTTGTCTGGTTTCAGAGGAGCTGCTT
ATCATCCTTCTTCATTTCTGGGGGTTTGTCTGGTTTCAGAGGAGCTGCTT

How can i do this?
I found grep -A1, but it select also the @HISEQ line...

Thanks,
Pap
Reply With Quote
 

Tags
line, pattern, select

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
perl pattern matching ibbo Programming & Packaging 0 30th April 2009 11:03 AM
Pattern Matching petervoldon Using Fedora 3 17th October 2008 10:19 AM
target pattern contains no `%' (firefox) CopyrightPhilly Using Fedora 1 8th April 2008 07:17 AM
Matching the '\' pattern in PHP preg_replace() CD-RW Programming & Packaging 3 18th July 2007 12:01 AM


Current GMT-time: 14:42 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat