07-02-2014
Welcome
Aviktheory11,
Please change your post to wrap your code/output in
[CODE] &
[/CODE] rather than
[ICODE] &
[/ICODE]. It makes it far easier to read.
Thanks for clearly putting in some effort before posting and for posting a good amount of information. Just a few questions:-
- What OS and version are you running?
- What are your preferred tools to work in? e.g. just ksh/bash, awk, etc.
- Can you post a small sample of input and the expected output, or perhaps (with a width of 32000) just a representative sample with fewer 'columns'
- How close have you got with your requirement?
- Is the data you want to split just a single column for each record? If not, then perhaps a tweak to your SELECT statement may be enough.
Thanks again,
Robin
This User Gave Thanks to rbatte1 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello gurus,
I am new to "awk" and trying to break a large file having 4 million records into several output files each having half million but at the same time I want to keep the similar key records in the same output file, not to exist accross the files.
e.g. my data is like:
Row_Num,... (6 Replies)
Discussion started by: kam66
6 Replies
2. Shell Programming and Scripting
I need to write a shell script for below scenario
My input file has data in format:
qwerty0101TWE 12345 01022005 01022005 datainala alanfernanded 26
qwerty0101mXZ 12349 01022005 06022008 datainalb johngalilo 28
qwerty0101TWE 12342 01022005 07022009 datainalc hitalbert 43
qwerty0101CFG 12345... (19 Replies)
Discussion started by: jimmy12
19 Replies
3. Shell Programming and Scripting
Hi Experts,
I have to split huge file based on the pattern to create smaller files. The pattern which is expected in the file is:
Master.....
First...
second....
second...
third..
third...
Master...
First..
second...
third...
Master...
First...
second..
second..
second..... (2 Replies)
Discussion started by: saisanthi
2 Replies
4. Shell Programming and Scripting
I am trying to update an older program on a small cluster. It uses individual files to send jobs to each node. However the newer database comes as one large file, containing over 10,000 records. I therefore need to split this file. It looks like this:
HMMER3/b
NAME 1-cysPrx_C
ACC ... (2 Replies)
Discussion started by: fozrun
2 Replies
5. Shell Programming and Scripting
HI All,
I have to split a xml file into multiple xml files and append it in another .xml file. for example below is a sample xml and using shell script i have to split it into three xml files and append all the three xmls in a .xml file. Can some one help plz.
eg:
<?xml version="1.0"?>... (4 Replies)
Discussion started by: ganesan kulasek
4 Replies
6. Shell Programming and Scripting
I will simplify the explaination a bit, I need to parse through a 87m file -
I have a single text file in the form of :
<NAME>house........
SOMETEXT
SOMETEXT
SOMETEXT
.
.
.
.
</script>
MORETEXT
MORETEXT
.
.
. (6 Replies)
Discussion started by: sumguy
6 Replies
7. Shell Programming and Scripting
Hello All ,
Please help me with below requirement
I want to split a xml file based on tag.here is the file format
<data-set>
some-information
</data-set>
<data-set1>
some-information
</data-set1>
<data-set2>
some-information
</data-set2>
I want to split the above file into 3... (5 Replies)
Discussion started by: Pratik4891
5 Replies
8. Shell Programming and Scripting
Hi Everyone,
I'm new here and I was checking this old post:
/shell-programming-and-scripting/180669-splitting-file-into-several-smaller-files-using-perl.html
(cannot paste link because of lack of points)
I need to do something like this but understand very little of perl.
I also check... (4 Replies)
Discussion started by: mcosta
4 Replies
9. Shell Programming and Scripting
Hi,
I'm having a xml file with multiple xml header. so i want to split the file into multiple files.
Sample.xml consists multiple headers so how can we split these multiple headers into multiple files in unix.
eg :
<?xml version="1.0" encoding="UTF-8"?>
<ml:individual... (3 Replies)
Discussion started by: Narendra921631
3 Replies
10. Shell Programming and Scripting
more a-d.txt1
<a-dets>
<a-serv>
<aserv>mymac14,mymac15:MYAPP:mydom:/web/domain/mydom/config
<NMGR>:MYAPP:/web/bea_apps/perf/NMGR/NMGR1034
<a-rep-string>
11.12.10.01=192.10.00.26
10.20.18.10=192.10.00.27
</a-rep-string>
</a-serv>
<w-serv>... (2 Replies)
Discussion started by: mohtashims
2 Replies
LEARN ABOUT DEBIAN
sql::translator::parser::xml::sqlfairy
SQL::Translator::Parser::XML::SQLFairy(3pm) User Contributed Perl Documentation SQL::Translator::Parser::XML::SQLFairy(3pm)
NAME
SQL::Translator::Parser::XML::SQLFairy - parser for SQL::Translator's XML.
SYNOPSIS
use SQL::Translator;
my $translator = SQL::Translator->new( show_warnings => 1 );
my $out = $obj->translate(
from => 'XML-SQLFairy',
to => 'MySQL',
filename => 'schema.xml',
) or die $translator->error;
print $out;
DESCRIPTION
This parser handles the flavor of XML used natively by the SQLFairy project (SQL::Translator). The XML must be in the namespace
"http://sqlfairy.sourceforge.net/sqlfairy.xml." See SQL::Translator::Producer::XML::SQLFairy for details of this format.
You do not need to specify every attribute of the Schema objects as any missing from the XML will be set to their default values. e.g. A
field could be written using only;
<sqlf:field name="email" data_type="varchar" size="255" />
Instead of the full;
<sqlf:field name="email" data_type="varchar" size="255" is_nullable="1"
is_auto_increment="0" is_primary_key="0" is_foreign_key="0" order="4">
<sqlf:comments></sqlf:comments>
</sqlf:field>
If you do not explicitly set the order of items using order attributes on the tags then the order the tags appear in the XML will be used.
default_value
Leave the attribute out all together to use the default in Schema::Field. Use empty quotes or 'EMPTY_STRING' for a zero lenth string.
'NULL' for an explicit null (currently sets default_value to undef in the Schema::Field obj).
<sqlf:field default_value="" /> <!-- Empty string -->
<sqlf:field default_value="EMPTY_STRING" /> <!-- Empty string -->
<sqlf:field default_value="NULL" /> <!-- NULL -->
ARGS
Doesn't take any extra parser args at the moment.
LEGACY FORMAT
The previous version of the SQLFairy XML allowed the attributes of the the schema objects to be written as either xml attributes or as data
elements, in any combination. While this allows for lots of flexibility in writing the XML the result is a great many possible XML formats,
not so good for DTD writing, XPathing etc! So we have moved to a fixed version described in SQL::Translator::Producer::XML::SQLFairy.
This version of the parser will still parse the old formats and emmit warnings when it sees them being used but they should be considered
heavily depreciated.
To convert your old format files simply pass them through the translator :)
$ sqlt -f XML-SQLFairy -t XML-SQLFairy schema-old.xml > schema-new.xml
BUGS
Ignores the order attribute for Constraints, Views, Indices, Views, Triggers and Procedures, using the tag order instead. (This is the
order output by the SQLFairy XML producer).
SEE ALSO
perl, SQL::Translator, SQL::Translator::Producer::XML::SQLFairy, SQL::Translator::Schema.
TODO
o Support options attribute.
o Test foreign keys are parsed ok.
o Control over defaulting.
AUTHOR
Mark D. Addison <mark.addison@itn.co.uk>, Jonathan Yu <frequency@cpan.org>
perl v5.14.2 2012-01-18 SQL::Translator::Parser::XML::SQLFairy(3pm)