03-24-2013
You explicitly state that file 1 is not sorted, but you don't say whether or not file 2 is sorted. Is file 2 sorted by increasing numeric values in fields 1, 2, and 3 as shown in your example, or is file 2 also unsorted?
What is the range of the values in fields 1, 2, and 3?
Are all of the values in fields 1, 2, and 3 integers or are floating point values also included?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am just stucked in syntax.This is more like a array and for loop problem.
I want to use ls -l command and get filezise and filename of all filenames in the directory in an array (say array#1).
After 2 minutes of sleep, i want to get the same information in another array (say array#2).
The... (4 Replies)
Discussion started by: 33junaid
4 Replies
2. Shell Programming and Scripting
Hello,
I have a problem with my script whereby it does not want to loop.
The function of my script is to FTP into a server and go to each directory/volume in the array 'VOL'. The way the loop is suppose to work, is to go into the first volume, get the files of R(yesterday's date) and... (3 Replies)
Discussion started by: tuffgong2008
3 Replies
3. Shell Programming and Scripting
Hi everyone:)
I have 2 files - IN & OUT. Example:
IN
A:13:30
B:45:40
.
.
. UNLIMITED
OUT
Z:12:24
Y:20:15
.
.
. UNLIMITED
I want first row of numbers of IN - OUT. Example 13-12 45-20
My code is (2 Replies)
Discussion started by: vincyoxy
2 Replies
4. Shell Programming and Scripting
So I'm trying to read datafile into an array, with each line representing one variable in the array. I'm successful at first but somehow it keeps getting erased.
i=0
grep '.*' datafile | while read line
do
echo $i
array=$(echo $line)
echo ${array} #printing array to make sure it's... (5 Replies)
Discussion started by: DrSammyD
5 Replies
5. Shell Programming and Scripting
I've got this problem, if I modify an array in the loop and print it, everything is fine as long as I stay in the loop. But, when I print it outside the loop, nothing happens... How can I solve this problem?
Here I prepared a sample for you to see my problem;
zgrw@Rain:~$ cat test
asd
123... (4 Replies)
Discussion started by: zgrw
4 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to run a do while for an array. And in the do while, I'm trying to get a user response. Depending on the the answer, I go ahead and do something or I move on to next element in the array.
So far I can read the array, but I can't get the if statement to work. Any suggestions... (5 Replies)
Discussion started by: nitin
5 Replies
7. Shell Programming and Scripting
Below is a test script I was trying to use so that I could understand why the logic was not working in a larger script. While accessing and printing array data inside the while loop, everything is fine. Outside the loop, i guess everything is null?? The for loop that is meant to cycle... (4 Replies)
Discussion started by: adlmostwanted
4 Replies
8. Shell Programming and Scripting
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies
9. Shell Programming and Scripting
Here's my code:
awk -F '' 'NR==FNR {
if (/time/ && $5>10)
A=$2" "$3":"$4":"($5-01)
else if (/time/ && $5<01)
A=$2" "$3":"$4-01":"(59-$5)
else if (/time/ && $5<=10)
A=$2" "$3":"$4":0"($5-01)
else if (/close/) {
B=0
n1=n2;
... (2 Replies)
Discussion started by: klane
2 Replies
10. Shell Programming and Scripting
Hi there,
A bit new to bash and am having an issue with a for loop. I look for filenames in a specified directory and pull the date string from each meeting a certain criteria, and then would like to make a directory for each date found, like this:
search 20180101.gz 20180102.gz 20180103.gz... (5 Replies)
Discussion started by: mwheeler12
5 Replies
LEARN ABOUT REDHAT
zggglm
ZGGGLM(l) ) ZGGGLM(l)
NAME
ZGGGLM - solve a general Gauss-Markov linear model (GLM) problem
SYNOPSIS
SUBROUTINE ZGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK, INFO )
INTEGER INFO, LDA, LDB, LWORK, M, N, P
COMPLEX*16 A( LDA, * ), B( LDB, * ), D( * ), WORK( * ), X( * ), Y( * )
PURPOSE
ZGGGLM solves a general Gauss-Markov linear model (GLM) problem:
minimize || y ||_2 subject to d = A*x + B*y
x
where A is an N-by-M matrix, B is an N-by-P matrix, and d is a given N-vector. It is assumed that M <= N <= M+P, and
rank(A) = M and rank( A B ) = N.
Under these assumptions, the constrained equation is always consistent, and there is a unique solution x and a minimal 2-norm solution y,
which is obtained using a generalized QR factorization of A and B.
In particular, if matrix B is square nonsingular, then the problem GLM is equivalent to the following weighted linear least squares problem
minimize || inv(B)*(d-A*x) ||_2
x
where inv(B) denotes the inverse of B.
ARGUMENTS
N (input) INTEGER
The number of rows of the matrices A and B. N >= 0.
M (input) INTEGER
The number of columns of the matrix A. 0 <= M <= N.
P (input) INTEGER
The number of columns of the matrix B. P >= N-M.
A (input/output) COMPLEX*16 array, dimension (LDA,M)
On entry, the N-by-M matrix A. On exit, A is destroyed.
LDA (input) INTEGER
The leading dimension of the array A. LDA >= max(1,N).
B (input/output) COMPLEX*16 array, dimension (LDB,P)
On entry, the N-by-P matrix B. On exit, B is destroyed.
LDB (input) INTEGER
The leading dimension of the array B. LDB >= max(1,N).
D (input/output) COMPLEX*16 array, dimension (N)
On entry, D is the left hand side of the GLM equation. On exit, D is destroyed.
X (output) COMPLEX*16 array, dimension (M)
Y (output) COMPLEX*16 array, dimension (P) On exit, X and Y are the solutions of the GLM problem.
WORK (workspace/output) COMPLEX*16 array, dimension (LWORK)
On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
LWORK (input) INTEGER
The dimension of the array WORK. LWORK >= max(1,N+M+P). For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB, where NB is an
upper bound for the optimal blocksizes for ZGEQRF, CGERQF, ZUNMQR and CUNMRQ.
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.
LAPACK version 3.0 15 June 2000 ZGGGLM(l)