![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| to extract specific value in a file | techmoris | Shell Programming and Scripting | 3 | 08-14-2009 06:46 PM |
| Remove specific content in a file | k9cheung | Shell Programming and Scripting | 1 | 08-10-2009 04:37 PM |
| find for specific content in file in the directory and list only file names | madhu_Jagarapu | AIX | 2 | 12-23-2008 02:13 AM |
| Retreive content between specific lines ina file | chennaitomcruis | Shell Programming and Scripting | 4 | 04-19-2008 11:18 AM |
| Content extract of a file using awk | nr_shan | Shell Programming and Scripting | 5 | 12-19-2007 05:22 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Extract specific content from a file
My input file: Code:
>sequence_1 ASSSSSSSSSSSDDDDDDDDDDDCCCCCCC ASDSFDFFDFDFFWERERERERFSDFESFSFD >sequence_2 ASDFDFDFFDDFFDFDSFDSFDFSDFSDFDSFASDSADSADASD ASDFFDFDFASFASFASFAFSFFSDASFASFASFAFS >sequence_3 VEDFGSDGSDGSDGSDGSDGSDGSDG dDFSDFSDFSDFSDFSDFSDFSDFSDF SDGFDGSFDGSGSDGSDGSDGSDGSDG My desired output file: Code:
>sequence_2 ASDFDFDFFDDFFDFDSFDSFDFSDFSDFDSFASDSADSADASD ASDFFDFDFASFASFASFAFSFFSDASFASFASFAFS I only want to extract the header of sequence_2 and its content. Do anybody got idea how to do it? Will awk response faster if got a long list of contents? Thanks for all of your suggestion
Last edited by radoulov; 10-07-2009 at 07:55 AM.. Reason: Use code tags, please! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|