Sponsored Content
Top Forums Shell Programming and Scripting How to extract some parts of a file to create some outfile Post 302314449 by vgersh99 on Friday 8th of May 2009 10:21:40 AM
Old 05-08-2009
Code:
nawk '
   /^Taxonomy/ {p++;close(out);out="output" ++cnt ".txt";next}
   /^[+]+End/ { p=0}
   p { print > out }' myInputFile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract columns from 2 different files and create new file

Hi All, I have 2 issues while working with file. 1. I have 2 delimited(~) files. I want to extract column numbner 3 from file1 and column number 8 from file2 and paste it into file3. I have tried using cut, but not able to get answer. 2. i have 2 filxed-width file. I wanted to do same... (1 Reply)
Discussion started by: Amit.Sagpariya
1 Replies

2. Shell Programming and Scripting

Extract date from filename and create a new file

Hi, i have a filename CRED20102009.txt in a server 20102009 is the date of the file ddmmaaaa format the complete route is /dprod/informatica/Fuentes/CRED20102009.csv i want to extract the date to create a new file named Parameters.txt I need to create Parameters.txt with this... (6 Replies)
Discussion started by: angel1001
6 Replies

3. Shell Programming and Scripting

Create shell script to extract unique information from one file to a new file.

Hi to all, I got this content/pattern from file http.log.20110808.gz mail1 httpd: Account Notice: close igchung@abc.com 2011/8/7 7:37:36 0:00:03 0 0 1 mail1 httpd: Account Information: login sastria9@abc.com proxy sid=gFp4DLm5HnU mail1 httpd: Account Notice: close sastria9@abc.com... (16 Replies)
Discussion started by: Mr_47
16 Replies

4. Shell Programming and Scripting

awk? create similarity matrix by calculating overlaps between sets comprising of individual parts

Hi everyone I am very new at awk and to me the task I need to get done is very very challenging... Nevertheless, after admiring how fast and elegant issues are being solved here I am sure this is my best chance. I have a 2D data file (input file is a plain tab-delimited text file). The first... (1 Reply)
Discussion started by: stonemonkey
1 Replies

5. Shell Programming and Scripting

extract certain parts from a file

I have a logfile from which i need to extract certain pattern based on the time but the problem here is the time is not same for all days. Input file: Mon 12:34:56 abvjingjgg Mon 12:34:57 ofjhjgjhgh . . . Mon 22:30:00 kkfng . . . Mon 23:12:23 kjgsdafhkljf . . . Tue 01:04:54... (8 Replies)
Discussion started by: gpk_newbie
8 Replies

6. Shell Programming and Scripting

Extract Parts of File

Hello All, I have a file like this Define schema flat_file_schema ( a varchar(20) ,b varchar(30) ,c varchar(40) ); (Insert into table ( a ,b ,c ) values ( 1 ,2 ,3 ); (4 Replies)
Discussion started by: nnani
4 Replies

7. Shell Programming and Scripting

Incrementing parts of ten digits number by parts

I have number in file which contains date and serial number: 2013101000. The last two digits are serial number (00). So maximum of serial number is 100. After reaching 100 it becomes 00 with incrementing 10 which is day with max 31. after reaching 31 it becomes 00 and increments 10... (31 Replies)
Discussion started by: Natalie
31 Replies

8. Solaris

Solaris 10 error "-sh: /tmp/outfile: cannot create"

Hello, Each time a user log on to host, they receive below error: -sh: /tmp/outfile: cannot create Example: $ ssh host user@host's password: Last login: Fri Dec 4 08:17:28 2015 from client.ref |-----------------------------------------------------------------| -sh:... (2 Replies)
Discussion started by: feroccimx
2 Replies

9. Shell Programming and Scripting

Extract parts of the line

I have a long list of lines in a txt file which i'm only interested to extract the list of domains like the colored ones. domain.com domain.com/page codes $.09 domain.org domain.org/page2/ codes $0.10 domain.net domain.net/page03 codes $0.05 domain.info ... (3 Replies)
Discussion started by: garfish
3 Replies

10. UNIX for Beginners Questions & Answers

TCL script to extract the file name and then create two independent list

I am having one problem as stated below Problem Description I am having some "sv" extension files , I am using "glob" to extract the matching files , Now in these matching files , I need to split them and extract the elements and create different lists. For example set files This... (1 Reply)
Discussion started by: kshitij
1 Replies
Bio::Taxonomy::FactoryI(3pm)				User Contributed Perl Documentation			      Bio::Taxonomy::FactoryI(3pm)

NAME
Bio::Taxonomy::FactoryI - interface to define how to access NCBI Taxonoy DESCRIPTION
NB: This module has been deprecated. $factory->fetch is a general method to fetch Taxonomy by either NCBI taxid or any types of names. $factory->fetch_parent($taxonomy), returns a Taxonomy that is one-step higher rank of the taxonomy specified as argument. $factory->fetch_children($taxonomy), reports an array of Taxonomy those are one-step lower rank of the taxonomy specified as the argument. AUTHOR - Juguang Xiao juguang@tll.org.sg CONTRIBUTORS
Additional contributors' names and emails here APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ fetch Title: fetch Usage: my $taxonomy = $factory->fetch(-taxon_id => 9605); my $taxonomy = $factory->fetch(-common_name => 'mammals'); Fuctnion: Fetch taxonomy by taxon_id, common name or scientific name. Returns: an instance of Bio::Taxonomy Args: -taxon_id => NCBI taxonomy ID -common_name => comon name, such as 'human', 'mammals' -scientifc_name => specitic name, such as 'sapiens', 'Mammalia' fuzzy_fetch Title: fuzzy_fetch Usage: my @taxonomy = $factory->fuzzy_fetch(-name => 'mouse'); Function: Fuzzy fetch by name, or any text information found in DB Returns: an array reference of Bio::Taxonomy objects Args: -name => any name, such as common name, variant, scientific name -description, or -desc => any text information fetch_parent Title: fetch_parent Usage: my $parent_taxonomy = $factory->fetch_parent($taxonomy); Function: Fetch the parent that is one-rank higher than the argument. Returns: an instance of Bio::Taxonomy, or undef if the arg is the top one. Args: a Bio::Taxonomy object. fetch_children Title: fetch_children Usage: my @children_taxonomy = $factory->fetch_children($taxonomy); Function: Fetch all children those are one-rank lower than the argument. Returns: an array reference of Bio::Taxonomy objects Args: a Bio::Taxonomy object. perl v5.14.2 2012-03-02 Bio::Taxonomy::FactoryI(3pm)
All times are GMT -4. The time now is 05:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy