awk script -print line when $2 > $2 of previous line
Hi all,
From a while loop I am reading a sorted file where I want to print only the lines that have $1 matchand $2 only when the difference from $2 from the previous line is > 30.
Input would be like ...
... the desired output being ...
So a couple of things need to be handled at once in this script.
Any idea?
Cheers, g
I know this has been asked before but I just can't parse the syntax as explained. I have a set of files that has user information spread out over two lines that I wish to merge into one:
User1NameLast User1NameFirst User1Address
E-Mail:User1email
User2NameLast User2NameFirst User2Address... (11 Replies)
HELLO...I wanted to ask you, than sure know unix more than me, as I can obtain the following solution: I have a file with rows of the type:
CIAO COME STAI
PERCHE COME STAI
CIAO COME VA
ALLO CHE FACCIAMO
.................
I would that if in a line is present the word (for example) " CHE... (9 Replies)
Need help creating a script that does the following:
Sort a file
Compare the previous line "last field" with current line "last field"
If they are the same, print output to a file
If they are different print output to a new file
The script should keep creating new files if the previous... (5 Replies)
My requirement is that when ever search criteria matchs in log file, the previous line just above the search word as well as search word should be print.
sample log file
--03-19T11:26 xxx create version "a.sh@@/main/6"
"104157 "
--03-18T16:01 xxx create version "a.sh@@/main/5"
... (6 Replies)
Hi guys,
I have found your forum super useful. However, right now I am stuck on a seemingly "simple" thing in AWK. I have two columns of data, the first column in Age (in million years) and the second column is Convergence Rate (in mm/yr).
I am trying to process my data so I can use it to... (2 Replies)
plz help me!!
I have this file ,
3408 5600
3796 6035
4200 6285
4676 0
40 1554
200 1998
652 2451
864 2728
1200 0
I want it like if $2==0,replace it with field from the previous line+500
say here the o/p would be like
3408 5600
3796 6035
4200 6285... (16 Replies)
Hello,
I have below format log file,
Comparing csv_converted_files/2201/9747.1012H67126.5077292103609547345.csv and csv_converted_files/22019/97447.1012H67126.5077292103609547345.csv
Comparing csv_converted_files/2559/9447.1012H67126.5077292103609547345.csv and... (6 Replies)
Hi All,
I need to print the characters in the previous line just before the regular expression match
Please have a look at the input file as attached
I need to match the regular expression ^ with the character of the previous like and also the pin numbers
and the output file should be like... (6 Replies)
Discussion started by: kshitij
6 Replies
LEARN ABOUT DEBIAN
clags2
clags2.f(3) LAPACK clags2.f(3)NAME
clags2.f -
SYNOPSIS
Functions/Subroutines
subroutine clags2 (UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV, SNV, CSQ, SNQ)
CLAGS2
Function/Subroutine Documentation
subroutine clags2 (logicalUPPER, realA1, complexA2, realA3, realB1, complexB2, realB3, realCSU, complexSNU, realCSV, complexSNV, realCSQ,
complexSNQ)
CLAGS2
Purpose:
CLAGS2 computes 2-by-2 unitary matrices U, V and Q, such
that if ( UPPER ) then
U**H *A*Q = U**H *( A1 A2 )*Q = ( x 0 )
( 0 A3 ) ( x x )
and
V**H*B*Q = V**H *( B1 B2 )*Q = ( x 0 )
( 0 B3 ) ( x x )
or if ( .NOT.UPPER ) then
U**H *A*Q = U**H *( A1 0 )*Q = ( x x )
( A2 A3 ) ( 0 x )
and
V**H *B*Q = V**H *( B1 0 )*Q = ( x x )
( B2 B3 ) ( 0 x )
where
U = ( CSU SNU ), V = ( CSV SNV ),
( -SNU**H CSU ) ( -SNV**H CSV )
Q = ( CSQ SNQ )
( -SNQ**H CSQ )
The rows of the transformed A and B are parallel. Moreover, if the
input 2-by-2 matrix A is not zero, then the transformed (1,1) entry
of A is not zero. If the input matrices A and B are both not zero,
then the transformed (2,2) element of B is not zero, except when the
first rows of input A and B are parallel and the second rows are
zero.
Parameters:
UPPER
UPPER is LOGICAL
= .TRUE.: the input matrices A and B are upper triangular.
= .FALSE.: the input matrices A and B are lower triangular.
A1
A1 is REAL
A2
A2 is COMPLEX
A3
A3 is REAL
On entry, A1, A2 and A3 are elements of the input 2-by-2
upper (lower) triangular matrix A.
B1
B1 is REAL
B2
B2 is COMPLEX
B3
B3 is REAL
On entry, B1, B2 and B3 are elements of the input 2-by-2
upper (lower) triangular matrix B.
CSU
CSU is REAL
SNU
SNU is COMPLEX
The desired unitary matrix U.
CSV
CSV is REAL
SNV
SNV is COMPLEX
The desired unitary matrix V.
CSQ
CSQ is REAL
SNQ
SNQ is COMPLEX
The desired unitary matrix Q.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
November 2011
Definition at line 158 of file clags2.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.1 Sun May 26 2013 clags2.f(3)