This is a little bit simpler than SriniShoo's script and seems to do what was requested (but it doesn't print the trailing spaces that were included in the expected results shown in the 1st message in this thread):
If you want to try this on a Solaris/SunOS system, change awk to /usr/xpg4/bin/awk or /usr/xpg6/bin/awk.
These 2 Users Gave Thanks to Don Cragun For This Post:
Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Hi All,
I would like to have a script which is able to perform the below.
Print the whole row if column1 which is "0001" for the below example is the first occurrence. Subsequent "0001" occurrence will not be printed out and so on.
Can any expert help ?
Input:
0001 k= 40
0001 k= 2... (7 Replies)
Hi,
I want to print column value based on row number say multiple of 8.
Input file:
line 1 67 34
line 2 45 57
. . .
. . .
line 8 12 46
. . .
. . .
line 16 24 90
. . .
. . .
line 24 49 67
Output
46
90
67 (2 Replies)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Hi all
I have file with columns
F3 pathway CPS
F2
H2
H4
H5
H6 no pathway CMP
H7
H8
H9
H10
My expected output is
F3 pathway CPS
F2 pathway CPS (10 Replies)
Hi.
How can we print those rows of file2 which are mentioned in file1. first character of file1 is a row number.. for eg
file1
1:abc
3:ghi
6:pqr
file2
a abc
b def
c ghi
d jkl
e mno
f pqr
... (6 Replies)
I have a table with this structure:
cola colb colc
1 19 lemon
20 31 lemon
32 100 lemon
159 205 cherries
210 500 cherries
and need to parse it into this format:
cola colb colc
1 100 lemon
159 500 cherries
So I need the first row of cola and the last row of colb if colc has the... (3 Replies)
Hello,
I have this table:
chr1_16857_17742 - chr1 17369 17436 "ENST00000619216.1"; "MIR6859-1"; - 67
chr1_16857_17742 - chr1 14404 29570 "ENST00000488147.1"; "WASH7P"; - 885
chr1_16857_18061 - chr1 ... (5 Replies)
Discussion started by: coppuca
5 Replies
LEARN ABOUT REDHAT
sgeequ
SGEEQU(l) ) SGEEQU(l)
NAME
SGEEQU - compute row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number
SYNOPSIS
SUBROUTINE SGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFO )
INTEGER INFO, LDA, M, N
REAL AMAX, COLCND, ROWCND
REAL A( LDA, * ), C( * ), R( * )
PURPOSE
SGEEQU computes row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number. R returns the row scale
factors and C the column scale factors, chosen to try to make the largest element in each row and column of the matrix B with elements
B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
R(i) and C(j) are restricted to be between SMLNUM = smallest safe number and BIGNUM = largest safe number. Use of these scaling factors is
not guaranteed to reduce the condition number of A but works well in practice.
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.
A (input) REAL array, dimension (LDA,N)
The M-by-N matrix whose equilibration factors are to be computed.
LDA (input) INTEGER
The leading dimension of the array A. LDA >= max(1,M).
R (output) REAL array, dimension (M)
If INFO = 0 or INFO > M, R contains the row scale factors for A.
C (output) REAL array, dimension (N)
If INFO = 0, C contains the column scale factors for A.
ROWCND (output) REAL
If INFO = 0 or INFO > M, ROWCND contains the ratio of the smallest R(i) to the largest R(i). If ROWCND >= 0.1 and AMAX is neither
too large nor too small, it is not worth scaling by R.
COLCND (output) REAL
If INFO = 0, COLCND contains the ratio of the smallest C(i) to the largest C(i). If COLCND >= 0.1, it is not worth scaling by C.
AMAX (output) REAL
Absolute value of largest matrix element. If AMAX is very close to overflow or very close to underflow, the matrix should be
scaled.
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, and i is
<= M: the i-th row of A is exactly zero
> M: the (i-M)-th column of A is exactly zero
LAPACK version 3.0 15 June 2000 SGEEQU(l)