04-16-2018
Quote:
Originally Posted by
Chubler_XL
Update to rdrtx1's solution (in red) to cover the duplicate field(s) qualification.
Excellent rdrtx1 for yout solution and Chubler_XL for the modification. With both solution it seems to work pretty nice even when in real file the strings have leading spaces.
Chubler_XL,
I see this solution has several arrays. Is there a tool to test and see what has stored each part of an awk program, the content of the arrays, etc?
Something similar to IRB(interactive Ruby) which we can test small parts of the ruby program. This in order to understand better the logic and how it works.
Thanks for help.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I was sure there was a way to put a timestamp ina logfile but I can't seem to figure out how.
What I would like to do is after the last messages in the rptmgr.err log is put a timestamp so I know the next time I look whats new. I am using AIX 5.1
any help will great
Thanks (2 Replies)
Discussion started by: rocker40
2 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to strip all lines between two headers in a file:
### BEGIN ###
Text to remove, contains all kinds of characters
...
Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c
om/updates/
Antispyware-Downloadserver.com #2... (3 Replies)
Discussion started by: Trones
3 Replies
3. Shell Programming and Scripting
Hi to all,
I have a file where the subject could contain "Summarized Availability Report" or only "Summarized Report"
If the subject is "Summarized Availability Report" I want to apply it Scrip1 and if the subject is "Summarized Report"
I want to apply it Scrip2.
1-) I would like you... (5 Replies)
Discussion started by: cgkmal
5 Replies
4. Shell Programming and Scripting
Hi ,
I have a typical situation. I have 4 files and with different headers (number of headers is varible ).
I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only).
For example -
File 1
H1|H2|H3|H4
11|12|13|14
21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies
5. Shell Programming and Scripting
Hello friends!
Each line of my input file has this format:
word<TAB>tag1<blankspace>lemma<TAB>tag2<blankspace>lemma ... <TAB>tag3<blankspace>lemma
Of this file I need to eliminate all the repeated tags (of the same word) in a line, as in the example here below, but conserving both (all) the... (2 Replies)
Discussion started by: mjomba
2 Replies
6. Shell Programming and Scripting
The question is not as simple as the title... I have a file, it looks like this
<string name="string1">RZ-LED</string>
<string name="string2">2.0</string>
<string name="string2">Version 2.0</string>
<string name="string3">BP</string>
I would like to check for duplicate entries of... (11 Replies)
Discussion started by: raidzero
11 Replies
7. Shell Programming and Scripting
Hi below is the input file, i need to find repeated words and sum up the values of it which is second field from the repeated work.Im trying but getting no where close to it.Kindly give me a hint on how to go about it
Input
fruits,apple,20,fruits,mango,20,veg,carrot,12,veg,raddish,30... (11 Replies)
Discussion started by: 100bees
11 Replies
8. UNIX for Dummies Questions & Answers
I posted this a few days ago and got some help (Putting together substrings if pattern is matched - Page 2 | Unix Linux Forums | Shell Programming and Scripting)
But I am now stuck on an issue that is similar but not the same really. I want to join parts of one line with parts of another line... (8 Replies)
Discussion started by: verse123
8 Replies
9. UNIX for Beginners Questions & Answers
I cannot seem to get what should be a simple awk one-liner to work correctly and cannot figure out why. I would like to use patterns from a specific field in one file as regex to search for matching strings in the entire line ($0) of another file.
I would like to output the lines of File2 which... (1 Reply)
Discussion started by: jvoot
1 Replies
10. Shell Programming and Scripting
i need to add 2 string variables into a positioning array , repeatedly - in loop.
First string in $2, second to $3 then up to the desired count incrementing the "position".
Using set -- alone does not increment the count so I end up with 2 variables in the array.
How do I increment the... (7 Replies)
Discussion started by: annacreek
7 Replies
SPOSV(l) ) SPOSV(l)
NAME
SPOSV - compute the solution to a real system of linear equations A * X = B,
SYNOPSIS
SUBROUTINE SPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
CHARACTER UPLO
INTEGER INFO, LDA, LDB, N, NRHS
REAL A( LDA, * ), B( LDB, * )
PURPOSE
SPOSV computes the solution to a real system of linear equations A * X = B, where A is an N-by-N symmetric positive definite matrix and X
and B are N-by-NRHS matrices.
The Cholesky decomposition is used to factor A as
A = U**T* U, if UPLO = 'U', or
A = L * L**T, if UPLO = 'L',
where U is an upper triangular matrix and L is a lower triangular matrix. The factored form of A is then used to solve the system of equa-
tions A * X = B.
ARGUMENTS
UPLO (input) CHARACTER*1
= 'U': Upper triangle of A is stored;
= 'L': Lower triangle of A is stored.
N (input) INTEGER
The number of linear equations, i.e., the order of the matrix A. N >= 0.
NRHS (input) INTEGER
The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
A (input/output) REAL array, dimension (LDA,N)
On entry, the symmetric matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part
of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular
part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
On exit, if INFO = 0, the factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T.
LDA (input) INTEGER
The leading dimension of the array A. LDA >= max(1,N).
B (input/output) REAL array, dimension (LDB,NRHS)
On entry, the N-by-NRHS right hand side matrix B. On exit, if INFO = 0, the N-by-NRHS solution matrix X.
LDB (input) INTEGER
The leading dimension of the array B. LDB >= max(1,N).
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, the leading minor of order i of A is not positive definite, so the factorization could not be completed, and the
solution has not been computed.
LAPACK version 3.0 15 June 2000 SPOSV(l)