01-11-2017
Any attempts / ideas / thoughts from your side to adapt the simple solution proposed?
And, I thought you wanted three columns?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
All,
I have a task to search through several hundred files and extract duplicate detail records and keep them grouped with their header record. If no duplicate detail record exists, don't pull the header. For example, an input file could look like this:
input.txt
HA
D1
D2
D2
D3
D4
D4... (17 Replies)
Discussion started by: run_eim
17 Replies
2. Shell Programming and Scripting
Hello All,
I have a file in the following format. I want to extract the date(020090930, 020090929) in the string "STPAGE020090930" and "STPAGE020090929" and prefix it to all lines below them. The output must be put into a new file.
STPAGE020090930
xyzz aalc... (3 Replies)
Discussion started by: john2022
3 Replies
3. Shell Programming and Scripting
hi,
I want to extract and save the cpu(s) information from top command output, but individual cpu statistics separately on a multi-processor machine.
In command line, top will show this statistics when we press the switch "1".
any ideas?
thanks,
meharo (3 Replies)
Discussion started by: meharo
3 Replies
4. Shell Programming and Scripting
Input file 1:
>pattern_5
GAATTCGTTCATGTAGGTTGASDASFGDSGRTYRYGHDGSDFGSDGGDSGSDGSDFGSDF
ATTTAATTATGATTCATACGTCATATGTTATTATTCAATCGTATAAAATTATGTGACCTT
SDFSDGSDFKSDAFLKJASLFJASKLFSJAKJFHASJKFHASJKFHASJKFHSJAKFHAW
>pattern_1
AAGTCTTAAGATATCACCGTCGATTAGGTTTATACAGCTTTTGTGTTATTTAAATTTGAC... (10 Replies)
Discussion started by: patrick87
10 Replies
5. Shell Programming and Scripting
Hi Folks,
I've searched for this for quite a while, but can't find any solution - hope someone can help.
I have various files with standard headers. eg.
<HEADER>
IP: 1.2.3.4
Username: Joe
Time: 12:00:00
Date: 23/05/2010
</HEADER>
This
is
a
test
and this part can be any size... (6 Replies)
Discussion started by: damoske
6 Replies
6. Shell Programming and Scripting
Hi,
I'm having trouble pulling out columns where the headers match a file of key ID's I'm interested in and was looking for some help.
file1.txt
I
Name
34
56
84
350
790
1215
1919
7606
9420
file2.txt
I Name 1 1 2 2 3 3 ... 34 34... 56 56... 84 84... 350 350...
M 1 A A A A... (20 Replies)
Discussion started by: flotsam
20 Replies
7. UNIX for Dummies Questions & Answers
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies
8. Shell Programming and Scripting
Hi to all,
I have two files. File1 has no header, two columns:
sample1 A
sample2 B
sample3 B
sample4 C
sample5 A
sample6 D
sample7 D
File2 has a header, except for the first 3 columns (chr,start,end). "sample1" is the header for the 4th ,5th ,6th columns, "sample2" is the header... (4 Replies)
Discussion started by: aec
4 Replies
9. UNIX for Beginners Questions & Answers
I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies
10. Shell Programming and Scripting
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
LEARN ABOUT REDHAT
zgelsx
ZGELSX(l) ) ZGELSX(l)
NAME
ZGELSX - routine is deprecated and has been replaced by routine ZGELSY
SYNOPSIS
SUBROUTINE ZGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK, RWORK, INFO )
INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
DOUBLE PRECISION RCOND
INTEGER JPVT( * )
DOUBLE PRECISION RWORK( * )
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
PURPOSE
This routine is deprecated and has been replaced by routine ZGELSY. ZGELSX computes the minimum-norm solution to a complex linear least
squares problem:
minimize || A * X - B ||
using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient.
Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS
right hand side matrix B and the N-by-NRHS solution matrix X.
The routine first computes a QR factorization with column pivoting:
A * P = Q * [ R11 R12 ]
[ 0 R22 ]
with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the
effective rank of A.
Then, R22 is considered to be negligible, and R12 is annihilated by unitary transformations from the right, arriving at the complete
orthogonal factorization:
A * P = Q * [ T11 0 ] * Z
[ 0 0 ]
The minimum-norm solution is then
X = P * Z' [ inv(T11)*Q1'*B ]
[ 0 ]
where Q1 consists of the first RANK columns of Q.
ARGUMENTS
M (input) INTEGER
The number of rows of the matrix A. M >= 0.
N (input) INTEGER
The number of columns of the matrix A. N >= 0.
NRHS (input) INTEGER
The number of right hand sides, i.e., the number of columns of matrices B and X. NRHS >= 0.
A (input/output) COMPLEX*16 array, dimension (LDA,N)
On entry, the M-by-N matrix A. On exit, A has been overwritten by details of its complete orthogonal factorization.
LDA (input) INTEGER
The leading dimension of the array A. LDA >= max(1,M).
B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
On entry, the M-by-NRHS right hand side matrix B. On exit, the N-by-NRHS solution matrix X. If m >= n and RANK = n, the residual
sum-of-squares for the solution in the i-th column is given by the sum of squares of elements N+1:M in that column.
LDB (input) INTEGER
The leading dimension of the array B. LDB >= max(1,M,N).
JPVT (input/output) INTEGER array, dimension (N)
On entry, if JPVT(i) .ne. 0, the i-th column of A is an initial column, otherwise it is a free column. Before the QR factorization
of A, all initial columns are permuted to the leading positions; only the remaining free columns are moved as a result of column
pivoting during the factorization. On exit, if JPVT(i) = k, then the i-th column of A*P was the k-th column of A.
RCOND (input) DOUBLE PRECISION
RCOND is used to determine the effective rank of A, which is defined as the order of the largest leading triangular submatrix R11
in the QR factorization with pivoting of A, whose estimated condition number < 1/RCOND.
RANK (output) INTEGER
The effective rank of A, i.e., the order of the submatrix R11. This is the same as the order of the submatrix T11 in the complete
orthogonal factorization of A.
WORK (workspace) COMPLEX*16 array, dimension
(min(M,N) + max( N, 2*min(M,N)+NRHS )),
RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
LAPACK version 3.0 15 June 2000 ZGELSX(l)