Hi
Not clear with your question. You said between 3rd and 4th dot, which is application to the third field(assuming , as delimiter). However, for the 4th field, I assumed it to be between 1st and 2nd dot:
Code:
$ cat a
TRANS,ARRIVED,ABC.1Gt.CDRFLOW123.MAINFRAMES.SYS.tXT/ARRIVED,TRANS/CDRFLOW123.MAINFRAMES.SYS.tXT/ARRIVED,TRANS
TRANS,DELIVERED,ABC.1Gt.CDRFLOW123.MAINFRAMES.SYS.tXT/DELIVERED,TRANS/CDRFLOW123.MAINFRAMES.SYS.tXT/DELIVERED,TRANS
$ awk '{split($3,a,/\./);split($3,b,/\//);$3=b[1]"/"a[4]"_"b[2];split($3,a,/\./);split($4,a,/\./);split($4,b,/\//);$4=b[1]"/"b[2]"/"a[2]"_"b[3];}1' FS=, OFS=, a
TRANS,ARRIVED,ABC.1Gt.CDRFLOW123.MAINFRAMES.SYS.tXT/MAINFRAMES_ARRIVED,TRANS/CDRFLOW123.MAINFRAMES.SYS.tXT/MAINFRAMES_ARRIVED,TRANS
TRANS,DELIVERED,ABC.1Gt.CDRFLOW123.MAINFRAMES.SYS.tXT/MAINFRAMES_DELIVERED,TRANS/CDRFLOW123.MAINFRAMES.SYS.tXT/MAINFRAMES_DELIVERED,TRANS
$
hi
i hav a file like
121212 asdd d 7 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 5 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 5 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 4 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 6 dfsdffdffsdfsdfsdfdf rrretrtrtre
i need to... (4 Replies)
Hi Gurus,
We have a ftpserver from which we do a dir command and output it to a local file.
The content of the ftpfile is:
07-15-09 06:06AM 5466 ABC_123_ER19057320090714082723.ZIP
07-15-09 06:07AM 3801 ABC_123_ER19155920090714082842.ZIP
07-15-09 06:07AM ... (14 Replies)
cat test.nmea|awk 'NR%3!=0'
This deletes the 3rd line, or I can delete the fourth but I can't figure out how to delete the 3rd and 4th together. I'm looking for a quick way to make a GPS log half its size.
Also how do I pipe the output to another file?
Hope someone can help! (5 Replies)
Hi friends,
My input file is this way
chr1 100 200 "abc"
chr1 350 400 "abc"
chr2 450 600 "def"
chr2 612 780 "def"
How do I make this file into
chr1 100 400 "abc"
chr2 450 780 "def"
This is basically matching on the fourth column and taking the minimum of second column and the... (4 Replies)
Hi,
I have came across the scenario where, we have to run the script on second and fourth Monday of each month.
I have tried to search man page of date and also forum for it but, could not get any answer to this.
Can you please advise how can we get second and fourth Monday of the month?
... (18 Replies)
Hello,
Im looking to help out my team by automating a simple search list. The user will look for a peering ip /30. For example 192.168.1.2/30 and gets the result. Im trying to get the entered /30 and subtract the last octet by one.
echo -n "Enter peering ip : "; read peeringip
cat... (3 Replies)
Assume a string that contains one or multiple occurrences of three different keywords (abbreviated as "kw"). I would like to replace kw2 with some other string, say "qux". Specifically, I would like to replace that occurrence of kw2 that is the first one that is preceded by kw1 somewhere in the... (4 Replies)
Hi, i have file file.txt with data like:
START
03:11:30 a
03:11:40 b
END
START
03:13:30 eee
03:13:35 fff
END
jjjjjjjjjjjjjjjjjjjjj
START
03:14:30 eee
03:15:30 fff
END
ggggggggggg
iiiiiiiiiiiiiiiiiiiiiiiii
I want the below output
START (13 Replies)
Discussion started by: Jyotshna
13 Replies
LEARN ABOUT REDHAT
cunml2
CUNML2(l) ) CUNML2(l)
NAME
CUNML2 - overwrite the general complex m-by-n matrix C with Q * C if SIDE = 'L' and TRANS = 'N', or Q'* C if SIDE = 'L' and TRANS = 'C',
or C * Q if SIDE = 'R' and TRANS = 'N', or C * Q' if SIDE = 'R' and TRANS = 'C',
SYNOPSIS
SUBROUTINE CUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO )
CHARACTER SIDE, TRANS
INTEGER INFO, K, LDA, LDC, M, N
COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
PURPOSE
CUNML2 overwrites the general complex m-by-n matrix C with Q * C if SIDE = 'L' and TRANS = 'N', or Q'* C if SIDE = 'L' and TRANS = 'C', or
C * Q if SIDE = 'R' and TRANS = 'N', or C * Q' if SIDE = 'R' and TRANS = 'C', where Q is a complex unitary matrix defined as the product of
k elementary reflectors
Q = H(k)' . . . H(2)' H(1)'
as returned by CGELQF. Q is of order m if SIDE = 'L' and of order n if SIDE = 'R'.
ARGUMENTS
SIDE (input) CHARACTER*1
= 'L': apply Q or Q' from the Left
= 'R': apply Q or Q' from the Right
TRANS (input) CHARACTER*1
= 'N': apply Q (No transpose)
= 'C': apply Q' (Conjugate transpose)
M (input) INTEGER
The number of rows of the matrix C. M >= 0.
N (input) INTEGER
The number of columns of the matrix C. N >= 0.
K (input) INTEGER
The number of elementary reflectors whose product defines the matrix Q. If SIDE = 'L', M >= K >= 0; if SIDE = 'R', N >= K >= 0.
A (input) COMPLEX array, dimension
(LDA,M) if SIDE = 'L', (LDA,N) if SIDE = 'R' The i-th row must contain the vector which defines the elementary reflector H(i), for
i = 1,2,...,k, as returned by CGELQF in the first k rows of its array argument A. A is modified by the routine but restored on
exit.
LDA (input) INTEGER
The leading dimension of the array A. LDA >= max(1,K).
TAU (input) COMPLEX array, dimension (K)
TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by CGELQF.
C (input/output) COMPLEX array, dimension (LDC,N)
On entry, the m-by-n matrix C. On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q.
LDC (input) INTEGER
The leading dimension of the array C. LDC >= max(1,M).
WORK (workspace) COMPLEX array, dimension
(N) if SIDE = 'L', (M) if SIDE = 'R'
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
LAPACK version 3.0 15 June 2000 CUNML2(l)