How to split a huge file into small pieces (per 2000 columns)?
Dear all,
I have a big file:2879(rows)x400,170 (columns) like below. I 'd like to split the file into small pieces:2879(rows)x2000(columns) per file (the last small piece will be 2879x170.
So far, I only know how to create one samll piece at one time. But actually I need to repeat this work many times. I am wondering if there is a easy way I just run the code once and it will create all the samll pieces itself. Anyone can help? Thanks!!
file:
Thanks.
Moderator's Comments:
Please use code tags when posting data and code samples!
Last edited by vgersh99; 09-29-2011 at 12:57 PM..
Reason: code tags, please!
Hi
I want to split a file that has 'n' number of records into 16 small files.
Can some one suggest me how to do this using Unix script?
Thanks
rrkk (10 Replies)
I’m new to Linux script and not sure how to filter out bad records from huge flat files (over 1.3GB each). The delimiter is a semi colon “;”
Here is the sample of 5 lines in the file:
Name1;phone1;address1;city1;state1;zipcode1
Name2;phone2;address2;city2;state2;zipcode2;comment... (7 Replies)
into small files. i need to add a head.txt and tail.txt into small files at the begin and end, and give a name as q1.xml q2.xml q3.xml ....
thank you very much. (2 Replies)
I have a 30 GB XMl file which looks like this:
<page>
<title>APRIL</title>
.........(text contents that I need to extract and store in 1.dat including the <title> tag)
</page>
<page>
<title>August</title>
....(text contents that I need to store in 2.dat including the <title> tag)
</page>... (13 Replies)
Hi,
I have a Huge 7 GB file which has around 1 million records, i want to split this file into 4 files to contain around 250k messages each.
Please help me as Split command cannot work here as it might miss tags..
Format of the file is as below
<!--###### ###### START-->... (6 Replies)
Dear shell experts,
I would like to spilt a txt file into small ones. However, I did not know how to program use shell. If someone could help, it is greatly appreciated!
Specifically, I supposed there is file named A.txt. The content of the file likes this:
Subject run condtion ACC time... (3 Replies)
I Have a large file with 24hrs log in the below format.i need to split the large file in to 24 small files on one hour based.i.e ex:from 09:55 to 10:55,10:55-11:55
can any one help me on this.!
... (20 Replies)
Gents
I have huge NAS File System as /sys with size 10 TB and I want to Split each 1TB in spirit File System to be mounted in the server.
How to can I do that without changing anything in the source.
Please your support. (1 Reply)
Discussion started by: AbuAliiiiiiiiii
1 Replies
LEARN ABOUT REDHAT
dlarre
DLARRE(l) ) DLARRE(l)
NAME
DLARRE - the tridiagonal matrix T, DLARRE sets "small" off-diagonal elements to zero, and for each unreduced block T_i, it finds (i) the
numbers sigma_i (ii) the base T_i - sigma_i I = L_i D_i L_i^T representations and (iii) eigenvalues of each L_i D_i L_i^T
SYNOPSIS
SUBROUTINE DLARRE( N, D, E, TOL, NSPLIT, ISPLIT, M, W, WOFF, GERSCH, WORK, INFO )
INTEGER INFO, M, N, NSPLIT
DOUBLE PRECISION TOL
INTEGER ISPLIT( * )
DOUBLE PRECISION D( * ), E( * ), GERSCH( * ), W( * ), WOFF( * ), WORK( * )
PURPOSE
Given the tridiagonal matrix T, DLARRE sets "small" off-diagonal elements to zero, and for each unreduced block T_i, it finds (i) the num-
bers sigma_i (ii) the base T_i - sigma_i I = L_i D_i L_i^T representations and (iii) eigenvalues of each L_i D_i L_i^T. The representations
and eigenvalues found are then used by DSTEGR to compute the eigenvectors of a symmetric tridiagonal matrix. Currently, the base represen-
tations are limited to being positive or negative definite, and the eigenvalues of the definite matrices are found by the dqds algorithm
(subroutine DLASQ2). As an added benefit, DLARRE also outputs the n Gerschgorin
intervals for each L_i D_i L_i^T.
ARGUMENTS
N (input) INTEGER
The order of the matrix.
D (input/output) DOUBLE PRECISION array, dimension (N)
On entry, the n diagonal elements of the tridiagonal matrix T. On exit, the n diagonal elements of the diagonal matrices D_i.
E (input/output) DOUBLE PRECISION array, dimension (N)
On entry, the (n-1) subdiagonal elements of the tridiagonal matrix T; E(N) need not be set. On exit, the subdiagonal elements of
the unit bidiagonal matrices L_i.
TOL (input) DOUBLE PRECISION
The threshold for splitting. If on input |E(i)| < TOL, then the matrix T is split into smaller blocks.
NSPLIT (input) INTEGER
The number of blocks T splits into. 1 <= NSPLIT <= N.
ISPLIT (output) INTEGER array, dimension (2*N)
The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to ISPLIT(1), the sec-
ond of rows/columns ISPLIT(1)+1 through ISPLIT(2), etc., and the NSPLIT-th consists of rows/columns ISPLIT(NSPLIT-1)+1 through
ISPLIT(NSPLIT)=N.
M (output) INTEGER
The total number of eigenvalues (of all the L_i D_i L_i^T) found.
W (output) DOUBLE PRECISION array, dimension (N)
The first M elements contain the eigenvalues. The eigenvalues of each of the blocks, L_i D_i L_i^T, are sorted in ascending order.
WOFF (output) DOUBLE PRECISION array, dimension (N)
The NSPLIT base points sigma_i.
GERSCH (output) DOUBLE PRECISION array, dimension (2*N)
The n Gerschgorin intervals.
WORK (input) DOUBLE PRECISION array, dimension (4*N???)
Workspace.
INFO (output) INTEGER
Output error code from DLASQ2
FURTHER DETAILS
Based on contributions by
Inderjit Dhillon, IBM Almaden, USA
Osni Marques, LBNL/NERSC, USA
LAPACK version 3.0 15 June 2000 DLARRE(l)