07-23-2012
@OP: It seems to me that you are looking for a solution where not all columns are significant, but then you would need to tell us which columns determine whether records are "equal" .
This User Gave Thanks to Scrutinizer For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to compare the first column values in two different files that use a numerical value as the key and output the more meaningful value found in the second column of file1 in front of the matching line(s) in file2. My problem is that file2 has multiple records. For example given:
FILE1... (4 Replies)
Discussion started by: RacerX
4 Replies
2. Shell Programming and Scripting
I have two files - file1 and file2. Now I want records in file2 those are not exist in file1. How to grep this ?
eg:
file1
08941
08944
08945
08946
08947
file2
08942 08944 5
08942 08945 5
08942 08946 4
08942 08947 6
08942 08952 4
08942 08963 5
08942 ... (3 Replies)
Discussion started by: suresh3566
3 Replies
3. Shell Programming and Scripting
Hi All,
I have two files say file1 and file2.
I want to check the number of records in file1 and if its atleast 2 (i.e., 2 or greater than 2 ) then I have to check records in file2 .If records in file2 is atleast 1 (i.e. if its not empty ) i have to set some conditions .
Could you pls... (3 Replies)
Discussion started by: mavesum
3 Replies
4. Shell Programming and Scripting
I am not an expert in awk, SED, etc... but I really hope there is a way to do this, because I don't want to have to right a program. I am using C shell.
FILE 1 FILE 2
H0000000 H0000000
MA1 MA1
CA1DDDDDD CA1AAAAAA
MA2 ... (2 Replies)
Discussion started by: jclanc8
2 Replies
5. Shell Programming and Scripting
I have 2 zip files which have about 20 million records in each file. file 2 will have additional records than file 1. I want to compare the records in both the files and capture the new records from file 2 into another file file3. Please help me with a command/script which provides me the desired... (8 Replies)
Discussion started by: koneru
8 Replies
6. Shell Programming and Scripting
Hi ,
My requirement is to Compare 2 files having different number of columns and records and get the ouptut containing all the non-matching records from File A(with all column values ) .Example data below :
File A contains following :
Aishvarya |1234... (4 Replies)
Discussion started by: aishvarya.singh
4 Replies
7. Shell Programming and Scripting
hi.. i am using solaris system and ksh and using nawk to get records of file1 not in file2(not line by line comparison). code i am using is nawk 'NR==FNR{a++} !a {print"line:" FNR"->" $0} ' file2 file1
same command with awk runs perfectly on darwin kernel(mac) but in solaris it does line by... (2 Replies)
Discussion started by: Abhiraj Singh
2 Replies
8. Shell Programming and Scripting
hi.. I want to compare records present in 1 file with those in 3 other files and print those records of file 1 which are not present in any of the files. for eg -
file1 file2 file3 file4
1 1 5 7
2 2 6 9
3
4
5
6
7
8
9
... (3 Replies)
Discussion started by: Abhiraj Singh
3 Replies
9. Shell Programming and Scripting
Hi,
I am using Sun Solaris - SunOS. I have two fixed width files shown below. I am trying to find the changes in the records in the Newfile.txt for the records where the key column matches. The first column is a key column (example: A123).
If there are any new or deletion of records in the... (4 Replies)
Discussion started by: Saanvi1
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
We have created a script that's checks the latency of IIDR subscription by fetching details from a config file (that contains subscription details) and running the CHCCLP command. The out put is then concatenated in a csv file. Once all subscription details are saved the script send a mail... (7 Replies)
Discussion started by: ab095
7 Replies
LEARN ABOUT REDHAT
sgelsx
SGELSX(l) ) SGELSX(l)
NAME
SGELSX - routine is deprecated and has been replaced by routine SGELSY
SYNOPSIS
SUBROUTINE SGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK, INFO )
INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
REAL RCOND
INTEGER JPVT( * )
REAL A( LDA, * ), B( LDB, * ), WORK( * )
PURPOSE
This routine is deprecated and has been replaced by routine SGELSY. SGELSX computes the minimum-norm solution to a real 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 orthogonal 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) REAL 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) REAL 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) REAL
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) REAL array, dimension
(max( min(M,N)+3*N, 2*min(M,N)+NRHS )),
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 SGELSX(l)