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 REDHAT
spbstf
SPBSTF(l) ) SPBSTF(l)
NAME
SPBSTF - compute a split Cholesky factorization of a real symmetric positive definite band matrix A
SYNOPSIS
SUBROUTINE SPBSTF( UPLO, N, KD, AB, LDAB, INFO )
CHARACTER UPLO
INTEGER INFO, KD, LDAB, N
REAL AB( LDAB, * )
PURPOSE
SPBSTF computes a split Cholesky factorization of a real symmetric positive definite band matrix A. This routine is designed to be used in
conjunction with SSBGST.
The factorization has the form A = S**T*S where S is a band matrix of the same bandwidth as A and the following structure:
S = ( U )
( M L )
where U is upper triangular of order m = (n+kd)/2, and L is lower triangular of order n-m.
ARGUMENTS
UPLO (input) CHARACTER*1
= 'U': Upper triangle of A is stored;
= 'L': Lower triangle of A is stored.
N (input) INTEGER
The order of the matrix A. N >= 0.
KD (input) INTEGER
The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0.
AB (input/output) REAL array, dimension (LDAB,N)
On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first kd+1 rows of the array. The j-th column
of A is stored in the j-th column of the array AB as follows: if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; if UPLO
= 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
On exit, if INFO = 0, the factor S from the split Cholesky factorization A = S**T*S. See Further Details. LDAB (input) INTEGER
The leading dimension of the array AB. LDAB >= KD+1.
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, the factorization could not be completed, because the updated element a(i,i) was negative; the matrix A is not
positive definite.
FURTHER DETAILS
The band storage scheme is illustrated by the following example, when N = 7, KD = 2:
S = ( s11 s12 s13 )
( s22 s23 s24 )
( s33 s34 )
( s44 )
( s53 s54 s55 )
( s64 s65 s66 )
( s75 s76 s77 )
If UPLO = 'U', the array AB holds:
on entry: on exit:
* * a13 a24 a35 a46 a57 * * s13 s24 s53 s64 s75
* a12 a23 a34 a45 a56 a67 * s12 s23 s34 s54 s65 s76 a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
If UPLO = 'L', the array AB holds:
on entry: on exit:
a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77 a21 a32 a43 a54 a65 a76 * s12 s23 s34 s54 s65 s76 *
a31 a42 a53 a64 a64 * * s13 s24 s53 s64 s75 * *
Array elements marked * are not used by the routine.
LAPACK version 3.0 15 June 2000 SPBSTF(l)