Hey all,
Can I put sed command inside the awk action ?? If not then can i do grep in the awk action ??
For ex:
awk '$1=="174" { ppid=($2) ; sed -n '/$ppid/p' tempfind.txt ; }' tempfind.txt
Assume: 174 is string.
Assume: tempfind.txt is used for awk and sed both.
tempfind.txt... (11 Replies)
i need a sample unix awk/sed program to replace param3 in a file.
i have sample file a.dat with the following format/length (week 8, sku 20, store 20 and qty 8). all store id's which end with _2 needs to be replaced with div id 2. all store id's which end with _1 needs to be replaced with div id... (4 Replies)
I need to add a field at the beginning of each record in the file. The file is comma seperated. Can somebody throw some light.
My record looks something like this
I need to add 100 at the beginning of each record.
o/p should be (2 Replies)
Hi All,
I am new to unix.
In this forum some days back, I have read something like below:
1) Do not use perl if awk can do your work.
2) Do not use awk if sed can do your work.
.
.
.
I do not re-collect the whole thing. I think it is good to know the precedence of using these... (2 Replies)
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Dear All,
The row_eff_tmstp (4th field) and row_expr_tmstp(5th field) in below data represents. If row_expr_tmstp is less than row_eff_tmstp I should replace that as null. First record is header record.
I/P
------
DD04 DD040001 DD040001 NO NO NONE ... (1 Reply)
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Greetings all,
I am looking for a version of Linux that I can practice my scripting skills on. Currently, I support a massive system running on AIX. I want to do more with awk, sed, grep, and even perl. I am looking for something I can throw on a VM on my personal laptop and mess around with.... (5 Replies)
Discussion started by: jeffs42885
5 Replies
LEARN ABOUT CENTOS
dlagv2.f
dlagv2.f(3) LAPACK dlagv2.f(3)NAME
dlagv2.f -
SYNOPSIS
Functions/Subroutines
subroutine dlagv2 (A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL, CSR, SNR)
DLAGV2 computes the Generalized Schur factorization of a real 2-by-2 matrix pencil (A,B) where B is upper triangular.
Function/Subroutine Documentation
subroutine dlagv2 (double precision, dimension( lda, * )A, integerLDA, double precision, dimension( ldb, * )B, integerLDB, double precision,
dimension( 2 )ALPHAR, double precision, dimension( 2 )ALPHAI, double precision, dimension( 2 )BETA, double precisionCSL, double
precisionSNL, double precisionCSR, double precisionSNR)
DLAGV2 computes the Generalized Schur factorization of a real 2-by-2 matrix pencil (A,B) where B is upper triangular.
Purpose:
DLAGV2 computes the Generalized Schur factorization of a real 2-by-2
matrix pencil (A,B) where B is upper triangular. This routine
computes orthogonal (rotation) matrices given by CSL, SNL and CSR,
SNR such that
1) if the pencil (A,B) has two real eigenvalues (include 0/0 or 1/0
types), then
[ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
[ 0 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
[ b11 b12 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
[ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ],
2) if the pencil (A,B) has a pair of complex conjugate eigenvalues,
then
[ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
[ a21 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
[ b11 0 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
[ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ]
where b11 >= b22 > 0.
Parameters:
A
A is DOUBLE PRECISION array, dimension (LDA, 2)
On entry, the 2 x 2 matrix A.
On exit, A is overwritten by the ``A-part'' of the
generalized Schur form.
LDA
LDA is INTEGER
THe leading dimension of the array A. LDA >= 2.
B
B is DOUBLE PRECISION array, dimension (LDB, 2)
On entry, the upper triangular 2 x 2 matrix B.
On exit, B is overwritten by the ``B-part'' of the
generalized Schur form.
LDB
LDB is INTEGER
THe leading dimension of the array B. LDB >= 2.
ALPHAR
ALPHAR is DOUBLE PRECISION array, dimension (2)
ALPHAI
ALPHAI is DOUBLE PRECISION array, dimension (2)
BETA
BETA is DOUBLE PRECISION array, dimension (2)
(ALPHAR(k)+i*ALPHAI(k))/BETA(k) are the eigenvalues of the
pencil (A,B), k=1,2, i = sqrt(-1). Note that BETA(k) may
be zero.
CSL
CSL is DOUBLE PRECISION
The cosine of the left rotation matrix.
SNL
SNL is DOUBLE PRECISION
The sine of the left rotation matrix.
CSR
CSR is DOUBLE PRECISION
The cosine of the right rotation matrix.
SNR
SNR is DOUBLE PRECISION
The sine of the right rotation matrix.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
September 2012
Contributors:
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
Definition at line 157 of file dlagv2.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.2 Tue Sep 25 2012 dlagv2.f(3)