Sponsored Content
Full Discussion: Finding repitition of series
Top Forums Shell Programming and Scripting Finding repitition of series Post 302560357 by jim mcnamara on Thursday 29th of September 2011 01:52:39 PM
Old 09-29-2011
Code:
awk 'function find(val)
      {
        p=$0
        while( (inx=index(p,val))>0 )
        {
           print val, inx
           p=substr(p,inx+1)
        }
     }
     /123/ {find("123") }
     /456/ {find("456") } 
     '   filename

 

10 More Discussions You Might Find Interesting

1. Programming

Ibm Mq Series

hi everybody, My name is Raj i work in GE Global Software Solutions As Siebel Analyst. Can any one help in writing the code in Ansi C on HP-Unix platform to get data from IBM MQ-Series Server. IBM MQ-series client will be installed on the client machine which is on WIN NT platform. And MQ-series... (2 Replies)
Discussion started by: garimella
2 Replies

2. Shell Programming and Scripting

Fibonacci series

Need code to run the Fibonacci series from 0 to 10 (16 Replies)
Discussion started by: nycol
16 Replies

3. Shell Programming and Scripting

finding duplicate files by size and finding pattern matching and its count

Hi, I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern. Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies

4. Programming

C with MQ Series

Hi, Any one please let me know, how to write in to MQ Series through C. I tried, but it was vein, am expecting material(URL) or code. Thanks, Naga:cool: (5 Replies)
Discussion started by: Nagapandi
5 Replies

5. Programming

series of combinations

HI I have a series(sorted), which i require to create combinations. I am not getting the good code for doing this. My series should generate the following combinations... Please help me in getting this in C++. Thanks for your help. A: A A B: A B A B A B C: A ... (1 Reply)
Discussion started by: rameshmelam
1 Replies

6. Solaris

M Series

Hi All, Do anyone know if I upgrade cpu module and memory module for one of the domain inside Sun M5000. After the upgrade, will the hostid for the domain change or it will remain as long we don't change the system board? Currently will try to upgrade one of the Sun M5000 with 4 domains... (2 Replies)
Discussion started by: mailbox80
2 Replies

7. UNIX for Dummies Questions & Answers

Finding specific series of strings or characters

After spending sometime playing around with my script I just cannot get it to do what I want. So I decided to ask. My file looks something like this: I am using the following code to extract sequences that contain dashes awk '/^>/{id=$0;next}{if (match($1,"-")) print id "\n" $0}' infile ... (17 Replies)
Discussion started by: Xterra
17 Replies

8. Shell Programming and Scripting

Finding Minimum in a Series

I have two LARGE files of data more than 20,000 line each, file-1 and file-2, and I wish to do the following if possible: file-1 1 2 5 7 9 2 4 6 3 8 9 4 6 8 9 3 2 1 3 1 2 . . . file-2 1 2 3 2 5 7 5 7 3 7 9 4 . (5 Replies)
Discussion started by: ali2011
5 Replies

9. Shell Programming and Scripting

SED: Pattern repitition regex matching

Fairly straightforward, but I'm having an awful time getting what I thought was a simple regex to work. I'll give the command I was playing with, and I'm aware why this one doesn't work (the 1,3 is off the A-Z, not the whole expression), I just don't know what the fix is: Actual Output(s): $... (5 Replies)
Discussion started by: Vryali
5 Replies

10. Red Hat

Find the series

Hai what command is used to find red hat linux 5 series? (2 Replies)
Discussion started by: vinayd
2 Replies
Bio::Index::SwissPfam(3pm)				User Contributed Perl Documentation				Bio::Index::SwissPfam(3pm)

NAME
Bio::Index::SwissPfam - Interface for indexing swisspfam files SYNOPSIS
use Bio::Index::SwissPfam; use strict; my $Index_File_Name = shift; my $inx = Bio::Index::SwissPfam->new('-filename' => $Index_File_Name, '-write_flag' => 'WRITE'); $inx->make_index(@ARGV); use Bio::Index::SwissPfam; use strict; my $Index_File_Name = shift; my $inx = Bio::Index::SwissPfam->new('-filename' => $Index_File_Name); foreach my $id (@ARGV) { my $seq = $inx->fetch($id); # Returns stream while( <$seq> ) { if(/^>/) { print; last; } } } DESCRIPTION
SwissPfam is one of the flat files released with Pfam. This modules provides a way of indexing this module. Inherits functions for managing dbm files from Bio::Index::Abstract.pm, and provides the basic funtionallity for indexing SwissPfam files. Only retrieves FileStreams at the moment. Once we have something better (ie, an object!), will use that. Heavily snaffled from Index::Fasta system of James Gilbert. Note: for best results 'use strict'. FEED_BACK Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Support Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: https://redmine.open-bio.org/project/bioperl AUTHOR - Ewan Birney APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ _index_file Title : _index_file Usage : $index->_index_file( $file_name, $i ) Function: Specialist function to index swisspfam format files. Is provided with a filename and an integer by make_index in its SUPER class. Example : Returns : Args : fetch Title : fetch Usage : $index->fetch( $id ) Function: Returns a Bio::Seq object from the index Example : $seq = $index->fetch( 'dJ67B12' ) Returns : Bio::Seq object Args : ID perl v5.14.2 2012-03-02 Bio::Index::SwissPfam(3pm)
All times are GMT -4. The time now is 10:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy