01-30-2013
Substring from the file name
Hi
I need substring from the file name of list of files. I mean i will have to load all the files into database which are there in the Directory.
I need to make the directory with the date(which is substring of the filename Eg: Filename_Name_2012013001010101.txt, So the directory should be 20120130).
I need to load this file into oracle and need to move the file into above created directory.
It should happend till all files are loaded into database. Could someone give the ideas?
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have two files:
One is a list of numbers:
1
5
6
7
10
The second is a very long string
abcdefghijklmno......1234567890
I'd like to print a new file with a 5 character substring that starts at each the positions listed in the 1st file:
such as:
abcde (4 Replies)
Discussion started by: dcfargo
4 Replies
2. Shell Programming and Scripting
hi
i need to name a file with a substring of a another file name.
i.e. if the old filename is abc.txt , the new filename should be abc_1.txt
i should get the substring of the file name and then name the new one
please let me know how to do it (4 Replies)
Discussion started by: adityamahi
4 Replies
3. Shell Programming and Scripting
Hi,
I have a folder list as below, I want to write a script to return a list like:
CASTLE_BU_20080801
CAUSEWAY_BU_20080801
HUNGHOM_BU_20080801
:
:
Can anyone help?
Thanks!
Victor Cheung
List of the folder:
# ls
CASTLE_BU_20080801.DMP OFFICE_MY1_BU_20080801.DMP... (1 Reply)
Discussion started by: victorcheung
1 Replies
4. Shell Programming and Scripting
I'm new to shell scripting and am trying to write a small script that pulls a substring out of a file that has a few lines of text in it. The file will eventually have a lot of text, I just put a few lines in it for testing purposes.
Anyway, this is what I have so far...
#!/bin/ksh
... (4 Replies)
Discussion started by: enator45
4 Replies
5. Shell Programming and Scripting
Hi,
I have a file with a long string, in the format:
name1=value,name2=value2.....namen=valuen
I want to query the file and extract 'value2' ONLY. name2=value2 can exist anywhere within the file.
Can anyone help me please wth a suitable BASH command?
Many thanks,
Matt (4 Replies)
Discussion started by: mjwoodford
4 Replies
6. Shell Programming and Scripting
Hi,
In my shell script. I am reading all files in directory.
And say if the file names are as follows:
adio_idfl_201302_df.txt
dfa_201301_dll.ctl
dalkd_20130301.csv
I would like to extract the numeric piece of each file name and display as follows:
201302
201301
20130301
I... (9 Replies)
Discussion started by: pinnacle
9 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have in my backup folder, files with names convention like this :
randomFileNames_13-02-2014_23h13m09+1392333189
randomFileNames_14-02-2014_02h13m09+1392343989
randomFileNames_14-02-2014_04h13m09+1392351189
etc....
Base on timestamp at end of the filename, I would to delete all the... (7 Replies)
Discussion started by: thuyetti
7 Replies
8. Shell Programming and Scripting
Hello,
A question please.
A have a file that contains a string. Ex:
AAAABBCCCCCDDEEEEEEEEEEFF
I'd want to recover 2 substrings, 'BB' and 'FF' and then leave them in a new file.
Could anoyone help me please?
Thanks in advance (3 Replies)
Discussion started by: nolo41
3 Replies
9. Shell Programming and Scripting
Hello,
A question please.
A have a file that contains a string. Ex:
AAAABBCCCCCDDEEEEEEEEEEFF
I'd want to recover 2 substrings, 'BB' and 'FF' and then leave them in a new file.
From position 5, 2 caracters (ex:"BB") and from position 25, 2 caracters (ex:"FF") in a file.
Could anoyone help me... (3 Replies)
Discussion started by: nolo41
3 Replies
10. Shell Programming and Scripting
I want to merge the lines by matching substring of the first file with first column of the second file.
file1:
S00739A_ACAGTG_L001_R1.fq.gz
S00739A_ACAGTG_L001_R2.fq.gz
S00739B_GCCAAT_L001_R1.fq.gz
S00739B_GCCAAT_L001_R2.fq.gz
S00739D_GTGAAA_L001_R1.fq.gz
S00739D_GTGAAA_L001_R2.fq.gz... (14 Replies)
Discussion started by: yifangt
14 Replies
LEARN ABOUT DEBIAN
bp_fast_load_gff
BP_FAST_LOAD_GFF(1p) User Contributed Perl Documentation BP_FAST_LOAD_GFF(1p)
NAME
bp_fast_load_gff.pl - Fast-load a Bio::DB::GFF database from GFF files.
SYNOPSIS
% bp_fast_load_gff.pl -d testdb dna1.fa dna2.fa features1.gff features2.gff ...
DESCRIPTION
This script loads a Bio::DB::GFF database with the features contained in a list of GFF files and/or FASTA sequence files. You must use the
exact variant of GFF described in Bio::DB::GFF. Various command-line options allow you to control which database to load and whether to
allow an existing database to be overwritten.
This script is similar to load_gff.pl, but is much faster. However, it is hard-coded to use MySQL and probably only works on Unix
platforms due to its reliance on pipes. See bp_load_gff.pl for an incremental loader that works with all databases supported by
Bio::DB::GFF, and bp_bulk_load_gff.pl for a fast MySQL loader that supports all platforms.
NOTES
If the filename is given as "-" then the input is taken from standard input. Compressed files (.gz, .Z, .bz2) are automatically
uncompressed.
FASTA format files are distinguished from GFF files by their filename extensions. Files ending in .fa, .fasta, .fast, .seq, .dna and their
uppercase variants are treated as FASTA files. Everything else is treated as a GFF file. If you wish to load -fasta files from STDIN,
then use the -f command-line swith with an argument of '-', as in
gunzip my_data.fa.gz | bp_fast_load_gff.pl -d test -f -
The nature of the load requires that the database be on the local machine and that the indicated user have the "file" privilege to load the
tables and have enough room in /usr/tmp (or whatever is specified by the $TMPDIR environment variable), to hold the tables transiently.
If your MySQL is version 3.22.6 and was compiled using the "load local file" option, then you may be able to load remote databases with
local data using the --local option.
About maxfeature: the default value is 100,000,000 bases. If you have features that are close to or greater that 100Mb in length, then the
value of maxfeature should be increased to 1,000,000,000. This value must be a power of 10.
If the list of GFF or fasta files exceeds the kernel limit for the maximum number of command-line arguments, use the --long_list
/path/to/files option.
The adaptor used is dbi::mysqlopt. There is currently no way to change this.
COMMAND-LINE OPTIONS
Command-line options can be abbreviated to single-letter options. e.g. -d instead of --database.
--database <dsn> Mysql database name
--create Reinitialize/create data tables without asking
--local Try to load a remote database using local data.
--user Username to log in as
--fasta File or directory containing fasta files to load
--password Password to use for authentication
--long_list Directory containing a very large number of
GFF and/or FASTA files
--maxfeature Set the value of the maximum feature size (default 100Mb; must be a power of 10)
--group A list of one or more tag names (comma or space separated)
to be used for grouping in the 9th column.
--gff3_munge Activate GFF3 name munging (see Bio::DB::GFF)
--summary Generate summary statistics for drawing coverage histograms.
This can be run on a previously loaded database or during
the load.
--Temporary Location of a writable scratch directory
SEE ALSO
Bio::DB::GFF, bulk_load_gff.pl, load_gff.pl
AUTHOR
Lincoln Stein, lstein@cshl.org
Copyright (c) 2002 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_FAST_LOAD_GFF(1p)