06-11-2013
I would go with Pamu's solution
simple and effective
This User Gave Thanks to PikK45 For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Dear All,
I have two files, which looks like:
File 1
124
235
152
178
156
142
178
163
159
File 2
124|5623
452|6698
178|9995 (8 Replies)
Discussion started by: rochitsharma
8 Replies
2. Emergency UNIX and Linux Support
Hi,
I want to specify multiple remote directories but want to transfer them in a single command with one connection with remote server. This avoids entering passwords repeatedly and is also efficient.
e.g.
rsync -vrt --size-only --delete user@host:/home/user1/dir1... (9 Replies)
Discussion started by: sardare
9 Replies
3. Shell Programming and Scripting
hai all
I am new to the world of shell scripting
I wanted to extract two columns from multiple files say around 25 files
and i wanted to get the separate outfile for each input file
tired using the following command to extract two columns from 25 files
awk... (2 Replies)
Discussion started by: hema dhevi
2 Replies
4. Shell Programming and Scripting
Hi,
I am trying to write a script to cleanup files in a log directory ..
cd log
find Datk** -mtime +7 -exec rm -f {} \; 2> /dev/null
Have used the above to clean up files in log directory more then 7 days older.
The file can be something like ( auto-generate by some processes and... (2 Replies)
Discussion started by: nss280
2 Replies
5. Shell Programming and Scripting
Hi,
I am trying to process 2 files simultaneously using awk satisfying following condition,
Both files contain 3 columns. It should take entry from column 1 from first file, look for that entry in file 2 and if found, add column 2 and column 3 from both files and output to third file. For e.g.... (4 Replies)
Discussion started by: muazfarooqaslam
4 Replies
6. Shell Programming and Scripting
I have a huge file semicolon( ; ) separated records are Pipe(|) delimited.
e.g
abc;def;ghi|jkl;mno;pqr|123;456;789
I need to replace the 50th field(semicolon separated) of each record with 9006. The 50th field can have no value e.g. ;;
Can someone help me with the appropriate command. (3 Replies)
Discussion started by: Gurkamal83
3 Replies
7. UNIX for Dummies Questions & Answers
I have a single record large file, semicolon ';' and pipe '|' separated. I am doing a vi on the file. It is throwing an error "File to long"
I need to actually remove the last | symbol from this file.
sed -e 's/\|*$//' filename
is working fine for small files. But not working on this big... (13 Replies)
Discussion started by: Gurkamal83
13 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I am running into an issue. I have a very big file. Wants to split it in smaller chunks. This file has multiple header/ trailers. Also, between each header/trailer there are records. Number of records in each header trailer combination can vary. Also, headers can start with... (3 Replies)
Discussion started by: Gurkamal83
3 Replies
9. Shell Programming and Scripting
Hi All
I am having one awk and sed requirement for the below problem.
I tried multiple options in my sed or awk and right output is not coming out.
Problem Description
###############################################################
I am having a big file say file having repeated... (4 Replies)
Discussion started by: kshitij
4 Replies
10. UNIX for Beginners Questions & Answers
Im having an issue when trying to replace the first column with a new set of values in multiple files. The results from the following code only replaces the files with the last set of values in val.txt. I want to replace all the files with all the values.
for date in {1..31}
do
for val in... (1 Reply)
Discussion started by: ncwxpanther
1 Replies
LEARN ABOUT REDHAT
sgelss
SGELSS(l) ) SGELSS(l)
NAME
SGELSS - compute the minimum norm solution to a real linear least squares problem
SYNOPSIS
SUBROUTINE SGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, INFO )
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
REAL RCOND
REAL A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
PURPOSE
SGELSS computes the minimum norm solution to a real linear least squares problem: Minimize 2-norm(| b - A*x |).
using the singular value decomposition (SVD) 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 effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.
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 the matrices B and X. NRHS >= 0.
A (input/output) REAL array, dimension (LDA,N)
On entry, the M-by-N matrix A. On exit, the first min(m,n) rows of A are overwritten with its right singular vectors, stored row-
wise.
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, B is overwritten by 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,max(M,N)).
S (output) REAL array, dimension (min(M,N))
The singular values of A in decreasing order. The condition number of A in the 2-norm = S(1)/S(min(m,n)).
RCOND (input) REAL
RCOND is used to determine the effective rank of A. Singular values S(i) <= RCOND*S(1) are treated as zero. If RCOND < 0, machine
precision is used instead.
RANK (output) INTEGER
The effective rank of A, i.e., the number of singular values which are greater than RCOND*S(1).
WORK (workspace/output) REAL array, dimension (LWORK)
On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
LWORK (input) INTEGER
The dimension of the array WORK. LWORK >= 1, and also: LWORK >= 3*min(M,N) + max( 2*min(M,N), max(M,N), NRHS ) For good perfor-
mance, LWORK should generally be larger.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this
value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value.
> 0: the algorithm for computing the SVD failed to converge; if INFO = i, i off-diagonal elements of an intermediate bidiagonal
form did not converge to zero.
LAPACK version 3.0 15 June 2000 SGELSS(l)