Rather than using sed to change your original template file and then change it back why not create a new file with the changes and remove once you are done. Here I use $$ which expands to shells processID to ensure unique filename in case script is run simultaneously.
Also assuming TEXT is supposed to be replaced with the table names:
Since i'm new to scripting i'm findind it difficult to code a script. The script has to be an executable with 2 paramters passed to it.The Parameters are
1. The Control file name(.ctl file)
2. The Data file name(.csv file)
Does anybody have an idea about it? :confused: (3 Replies)
Hi....can you guys help me out in this script??
Below is a portion text file and it contains these:
GEF001 000093625 MKL002510 000001 000000 000000 000000 000000 000000 000001
GEF001 000093625 MKL003604 000001 000000 000000 000000 000000 000000 000001
GEF001 000093625 MKL005675 000001... (1 Reply)
Need shell script to read two file at same time and print output in single file
Example I have two files 1) file1.txt 2) file2.txt
File1.txt contains
Aaa
Bbb
Ccc
Ddd
Eee
Fff
File2.txt contains
Zzz
Yyy
Xxx (10 Replies)
I have to create a single file from three files, Please see below for samples:
day.txt
20090101
20090102
item.txt
123456789101
12345678910209
1234567891
str.txt
1
12
123
output.txt
20090101123456789101 1 0
2009010112345678910209 12 ... (2 Replies)
Hi,
We have almost 45,000 data files created by a script daily. The file names are of format-ODS.POS.<pharmacyid>.<table name>.<timestamp>.dat. There will be one data file like this for each pharmacy and each table.(Totally around 45,000)
The requirement is to create a control file for each... (2 Replies)
Hello everyone,
I am new to shell scripting/ loading data into a database.
I want to load data into Oracle database using SQL loader. Can some one please explain why do we need unix shell script to load the data into the database? Also can someone please explain what has to be in that script?... (5 Replies)
I need to read a text file that contain columns of data, i need to read 1st column as a function to call, and others are the data i need to get into a ksh script.
I am quite new to ksh scripting, i am not very sure how to read each row line by line and the data in each columns of that line, set... (3 Replies)
Hi,
I want your help to see if there is a way wherein we can load a set of files which are lying in unix server into my database using sql loader.
Also the person who will be running sql loader does not have access to unix system.
So is there a way i can provide any sql loader script wherein... (1 Reply)
All,
I am trying to create a report on the duration of an ETL load from the file arrival to the final dump in to a database for SLA's.
Does anyone have any guidance or ideas on how metadata can be extracted; information of a file: like file name, created timestamp, count of records and load... (1 Reply)
Delete
---- Original post, restored by mod after being deleted by abhilashnair ----
I have a requirement where, I need to create a control file which will have 3 columns in the header row as below:
Filename
Count
Checksum
This above control file has to contain metadata as above... (2 Replies)
Discussion started by: abhilashnair
2 Replies
LEARN ABOUT DEBIAN
bp_genbank2gff
BP_GENBANK2GFF(1p) User Contributed Perl Documentation BP_GENBANK2GFF(1p)NAME
bp_genbank2gff.pl - Load a Bio::DB::GFF database from GENBANK files.
SYNOPSIS
% bp_genbank2gff.pl -d genbank -f localfile.gb
% bp_genbank2gff.pl -d genbank --accession AP003256
% bp_genbank2gff.pl --accession AP003256 --stdout
DESCRIPTION
This script loads a Bio::DB::GFF database with the features contained in a either a local genbank file or an accession that is fetched from
genbank. Various command-line options allow you to control which database to load and whether to allow an existing database to be
overwritten.
The database must already have been created and the current user must have appropriate INSERT and UPDATE privileges. The --create option
will initialize a new database with the appropriate schema, deleting any tables that were already there.
COMMAND-LINE OPTIONS
Command-line options can be abbreviated to single-letter options. e.g. -d instead of --database.
--create Force creation and initialization of database
--dsn <dsn> Data source (default dbi:mysql:test)
--user <user> Username for mysql authentication
--pass <password> Password for mysql authentication
--proxy <proxy> Proxy server to use for remote access
--stdout direct output to STDOUT
--adaptor <adaptor> adaptor to use (eg dbi::mysql, dbi::pg, dbi::oracle) --viral the genome you are loading is viral (changes tag
choices)
--source <source> source field for features ['genbank']
EITHER --file Arguments that follow are Genbank/EMBL file names
OR --gb_folder What follows is a folder full of gb files to process OR --accession Arguments that follow are genbank accession numbers
(not gi!)
OR --acc_file Accession numbers (not gi!) in a file (one per line, no punc.)
OR --acc_pipe Accession numbers (not gi!) from a STDIN pipe (one
per line)
SEE ALSO
Bio::DB::GFF, bulk_load_gff.pl, load_gff.pl
AUTHOR
Scott Cain, cain@cshl.org
Copyright (c) 2003 Cold Spring Harbor Laboratory
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for
disclaimers of warranty.
perl v5.14.2 2012-03-02 BP_GENBANK2GFF(1p)