Sponsored Content
Top Forums Shell Programming and Scripting Awk/sed problem to write Db insertion statement Post 302846785 by spacebar on Sunday 25th of August 2013 10:52:18 PM
Old 08-25-2013
Another option is to use a dblink between the two databases.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with awk and if statement

Hi, I have a task where i need to compare columns of two files. First file is $REG_InputFileName: "UPDATE","1010021126","1-01-01","USD" "UPDATE","1013000101","1-01-01","THB" "UPDATE","1013010107","1-01-01","THB" "UPDATE","1110011122","1-01-01","USD"... (5 Replies)
Discussion started by: manmeet
5 Replies

2. Shell Programming and Scripting

insertion of text from sed script

Hi , This is my first thread ; facing some issues withmy sed script I need to insert the code from my log file which is between two keywords. content is like this ........ log ############################ log1 log2 231 "Ban" "tom" and the line one of the cross line friend... (2 Replies)
Discussion started by: shalini_008
2 Replies

3. Shell Programming and Scripting

AWK script problem insertion of code

Hi , I am having two files like this FILE1 #################### input SI_TESTONLY_R_00; input CE0_SE_INPUT_TESTONLY; input CE0_TCLK_TESTONLY; input SI_JTGCLOCKDR_JTAG_R_00; input CE0_TCLK_JTGCLOCKDR_JTAG; input CE0_SE_INPUT_JTGCLOCKDR_JTAG; output SO_TESTONLY_R_00; output... (2 Replies)
Discussion started by: jaita
2 Replies

4. Shell Programming and Scripting

Need help in using sed/awk for line insertion in xml

Hello, I have two text files (txt1 and txt2). txt1 contains many lines with a single number in each line. txt2 (xml format) contains information about the numbers given in txt1. I need to insert one line in txt2 within the scope of each number taken from txt1. Sample problem: txt1: 12 23... (1 Reply)
Discussion started by: shekhar2010us
1 Replies

5. Shell Programming and Scripting

Text file insertion via sed

I have 800+ html files that need to have a javascript added to them in the head. I can do the looping, setting filenames as variables, etc. but I cannot figure out how to insert my javascript file into the html. My javascript is in a file named jsinsert.txt It basically has this format:... (4 Replies)
Discussion started by: Trapper
4 Replies

6. Shell Programming and Scripting

Use awk/sed/grep with goto statement!

Hi, I have an array with characters and I am looking for specific character in that array and if those specific character not found than I use goto statment which is define somehwhere in the script. My code is: set a = (A B C D E F) @ i = 0 while ($i <= ${#a}) if ($a != "F" || $a != "D")... (3 Replies)
Discussion started by: dixits
3 Replies

7. Shell Programming and Scripting

[BASH] Problem with a sed -n statement

Hey all, So I've been banging my head against this for a few hours (:wall:) and I can't see whats wrong with it, each part seems to work fine on its own when entered at command line, but then it falls down when pulled together. I'm writing a script to translate fractional atomic coordinates... (3 Replies)
Discussion started by: EdinburghLad
3 Replies

8. Shell Programming and Scripting

Convert Update statement into Insert statement in UNIX using awk, sed....

Hi folks, I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex. I have a bunch of update statements with all columns in a file which I need to convert into insert statements. UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies

9. Shell Programming and Scripting

sed within awk statement

input | Jan 8 2018 11:28PM| 24 | 75 | 51 | 1 | 1.600| | Jan 8 2018 12:01PM| 52 | 823 | 21 | 6 | 2.675| desired output Jan-8-2018-11:28PM 24 75 51 1 1.600 Jan-8-2018-12:01PM 52 823 21 6 2.675 Dear friends, I have input file , as shown above and... (10 Replies)
Discussion started by: sagar_1986
10 Replies

10. Shell Programming and Scripting

awk statement piped inside sed

Hello folks, I have multiple occurrences of the pattern: ).: where is any digit, in various text context but the pattern is unique as this regex. And I need to turn this decimal fraction into an integer (corresponding percent value: the range of 0-100). What I'm doing is: cat... (1 Reply)
Discussion started by: roussine
1 Replies
Bio::Annotation::DBLink(3pm)				User Contributed Perl Documentation			      Bio::Annotation::DBLink(3pm)

NAME
Bio::Annotation::DBLink - untyped links between databases SYNOPSIS
$link1 = Bio::Annotation::DBLink->new(-database => 'TSC', -primary_id => 'TSC0000030' ); #or $link2 = Bio::Annotation::DBLink->new(); $link2->database('dbSNP'); $link2->primary_id('2367'); # DBLink is-a Bio::AnnotationI object, can be added to annotation # collections, e.g. the one on features or seqs $feat->annotation->add_Annotation('dblink', $link2); DESCRIPTION
Provides an object which represents a link from one object to something in another database without prescribing what is in the other database. Aside from Bio::AnnotationI, this class also implements Bio::IdentifiableI. AUTHOR - Ewan Birney Ewan Birney - birney@ebi.ac.uk APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ new Title : new Usage : $dblink = Bio::Annotation::DBLink->new(-database =>"GenBank", -primary_id => "M123456"); Function: Creates a new instance of this class. Example : Returns : A new instance of Bio::Annotation::DBLink. Args : Named parameters. At present, the following parameters are recognized. -database the name of the database referenced by the xref -primary_id the primary (main) id of the referenced entry (usually this will be an accession number) -optional_id a secondary ID under which the referenced entry is known in the same database -comment comment text for the dbxref -tagname the name of the tag under which to add this instance to an annotation bundle (usually 'dblink') -type the type of information in the referenced entry (e.g. protein, mRNA, structure) -namespace synonymous with -database (also overrides) -version version of the referenced entry -authority attribute of the Bio::IdentifiableI interface -url attribute of the Bio::IdentifiableI interface AnnotationI implementing functions as_text Title : as_text Usage : Function: Example : Returns : Args : display_text Title : display_text Usage : my $str = $ann->display_text(); Function: returns a string. Unlike as_text(), this method returns a string formatted as would be expected for te specific implementation. One can pass a callback as an argument which allows custom text generation; the callback is passed the current instance and any text returned Example : Returns : a string Args : [optional] callback hash_tree Title : hash_tree Usage : Function: Example : Returns : Args : tagname Title : tagname Usage : $obj->tagname($newval) Function: Get/set the tagname for this annotation value. Setting this is optional. If set, it obviates the need to provide a tag to Bio::AnnotationCollectionI when adding this object. When obtaining an AnnotationI object from the collection, the collection will set the value to the tag under which it was stored unless the object has a tag stored already. Example : Returns : value of tagname (a scalar) Args : new value (a scalar, optional) Specific accessors for DBLinks database Title : database Usage : $self->database($newval) Function: set/get on the database string. Databases are just a string here which can then be interpreted elsewhere Example : Returns : value of database Args : newvalue (optional) primary_id Title : primary_id Usage : $self->primary_id($newval) Function: set/get on the primary id (a string) The primary id is the main identifier used for this object in the database. Good examples would be accession numbers. The id is meant to be the main, stable identifier for this object Example : Returns : value of primary_id Args : newvalue (optional) optional_id Title : optional_id Usage : $self->optional_id($newval) Function: get/set for the optional_id (a string) optional id is a slot for people to use as they wish. The main issue is that some databases do not have a clean single string identifier scheme. It is hoped that the primary_id can behave like a reasonably sane "single string identifier" of objects, and people can use/abuse optional ids to their heart's content to provide precise mappings. Example : Returns : value of optional_id Args : newvalue (optional) comment Title : comment Usage : $self->comment($newval) Function: get/set of comments (comment object) Sets or gets comments of this dblink, which is sometimes relevant Example : Returns : value of comment (Bio::Annotation::Comment) Args : newvalue (optional) type Title : type Usage : $self->type($newval) Function: get/set of type Sets or gets the type of this dblink. Example : $self->type('protein') Returns : value of type Args : newvalue (optional) Methods for Bio::IdentifiableI compliance object_id Title : object_id Usage : $string = $obj->object_id() Function: a string which represents the stable primary identifier in this namespace of this object. For DNA sequences this is its accession_number, similarly for protein sequences This is aliased to primary_id(). Returns : A scalar version Title : version Usage : $version = $obj->version() Function: a number which differentiates between versions of the same object. Higher numbers are considered to be later and more relevant, but a single object described the same identifier should represent the same concept Returns : A number url Title : url Usage : $url = $obj->url() Function: URL which is associated with this DB link Returns : string, full URL descriptor authority Title : authority Usage : $authority = $obj->authority() Function: a string which represents the organisation which granted the namespace, written as the DNS name for organisation (eg, wormbase.org) Returns : A scalar namespace Title : namespace Usage : $string = $obj->namespace() Function: A string representing the name space this identifier is valid in, often the database name or the name describing the collection For DBLink this is the same as database(). Returns : A scalar perl v5.14.2 2012-03-02 Bio::Annotation::DBLink(3pm)
All times are GMT -4. The time now is 01:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy