I want to get value of last row and 6 column from awk. Below is the format of my file. And RED one is my desired value. Actaully this stats usally update after every 1 hour so i want that every time i run the script i get the latest value.
Ending time - 01:00:58
HOURLY CALL ATTEMPTS (NORMALIZED) = 58227
Ending time - 02:00:59
HOURLY CALL ATTEMPTS (NORMALIZED) = 39987
Ending time - 03:00:58
HOURLY CALL ATTEMPTS (NORMALIZED) = 20922
Ending time - 04:00:56
HOURLY CALL ATTEMPTS (NORMALIZED) = 11385
Ending time - 05:00:57
HOURLY CALL ATTEMPTS (NORMALIZED) = 6441
Ending time - 06:00:56
HOURLY CALL ATTEMPTS (NORMALIZED) = 6598
Ending time - 07:00:59
HOURLY CALL ATTEMPTS (NORMALIZED) = 14472
Ending time - 08:00:59
HOURLY CALL ATTEMPTS (NORMALIZED) = 30849
Ending time - 09:00:58
HOURLY CALL ATTEMPTS (NORMALIZED) = 59088
Ending time - 10:00:58
HOURLY CALL ATTEMPTS (NORMALIZED) = 99476
When i use this command
so it gives me the 6th column of all file but what i exactly want is last line and 6th column.
I have a csv file: test1.csv with 26 columns
Sample:
Data collected Comp1,,,,,,,,,,,,,,,,,,,,,,,,,Average
Number of Arrivals with non Zero,0,0,0,0,0,0,0,0,0,...,0
%Utilization,0.1,0.23,0.14,...,0.36
Data collected Comp2,,,,,,,,,,,,,,,,,,,,,,,,,Average
Number of Arrivals with non... (2 Replies)
awk '{ gsub(/....=/,""); print }' want.dat >final.dat
the above awk command which removes all the chars before and including '=' on the entire row. --thats what it meant be.:)
but i need to remove text on column-wise on each row.
many thanks,
EM
---------- Post updated at 10:00 AM... (4 Replies)
Hello,
am I new to awk, and I am tryint to:
INPUT FILE:
"73423555","73423556","73423557","73423558","73423559"
OUTPUT FILE:
73423555
73423556
73423557
73423558
73423559
My useless code so far:
#!/bin/awk -F ','
BEGIN
{
i=0;
} (8 Replies)
Hi all!
I have this kind of output:
a1|b1|c1|d1|e1
a2|b2|c2
a3|b3|c3|d3
I would like to transpose columns d and e (when they exist) in column c, and under the row where they come from.
Then copying the beginning of the row.
In order to obtain:
a1|b1|c1
a1|b1|d1
a1|b1|e1
a2|b2|c2... (1 Reply)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Hi there,
I have a small csv file example below:
source,cu_001,cu_001_volume,cu_001_mass,cu_002,cu_002_volume,cu_002_mass,cu_003,cu_003_volume,cu_003_mass
ja116,1.33,3024000,9374400,1.54,3026200,9375123,1.98,3028000,9385512
I want to transpose columns to rows starting at the second... (3 Replies)
Hi ,
Can anyone help me suggesting - how to do the below trick with awk
Input
120
130
140
210
310
410
645
729
800
Output
120 130 140 (6 Replies)
Discussion started by: Indra2011
6 Replies
LEARN ABOUT OSX
mpi_request_free
MPI_Request_free(3OpenMPI)MPI_Request_free(3OpenMPI)NAME
MPI_Request_free - Frees a communication request object.
SYNTAX C Syntax
#include <mpi.h>
int MPI_Request_free(MPI_Request *request)
Fortran Syntax
INCLUDE 'mpif.h'
MPI_REQUEST_FREE(REQUEST, IERROR)
INTEGER REQUEST, IERROR
C++ Syntax
#include <mpi.h>
void Request::Free()
INPUT /OUTPUT PARAMETER
request
Communication request (handle).
DESCRIPTION
This operation allows a request object to be deallocated without waiting for the associated communication to complete.
MPI_Request_free marks the request object for deallocation and sets request to MPI_REQUEST_NULL. Any ongoing communication that is associ-
ated with the request will be allowed to complete. The request will be deallocated only after its completion.
NOTES
Once a request is freed by a call to MPI_Request_free, it is not possible to check for the successful completion of the associated communi-
cation with calls to MPI_Wait or MPI_Test. Also, if an error occurs subsequently during the communication, an error code cannot be returned
to the user -- such an error must be treated as fatal. Questions arise as to how one knows when the operations have completed when using
MPI_Request_free. Depending on the program logic, there may be other ways in which the program knows that certain operations have completed
and this makes usage of MPI_Request_free practical. For example, an active send request could be freed when the logic of the program is
such that the receiver sends a reply to the message sent -- the arrival of the reply informs the sender that the send has completed and the
send buffer can be reused. An active receive request should never be freed, as the receiver will have no way to verify that the receive has
completed and the receive buffer can be reused.
Example:
CALL MPI_COMM_RANK(MPI_COMM_WORLD, rank)
IF(rank.EQ.0) THEN
DO i=1, n
CALL MPI_ISEND(outval, 1, MPI_REAL, 1, 0, req, ierr)
CALL MPI_REQUEST_FREE(req, ierr)
CALL MPI_IRECV(inval, 1, MPI_REAL, 1, 0, req, ierr)
CALL MPI_WAIT(req, status, ierr)
END DO
ELSE ! rank.EQ.1
CALL MPI_IRECV(inval, 1, MPI_REAL, 0, 0, req, ierr)
CALL MPI_WAIT(req, status)
DO I=1, n-1
CALL MPI_ISEND(outval, 1, MPI_REAL, 0, 0, req, ierr)
CALL MPI_REQUEST_FREE(req, ierr)
CALL MPI_IRECV(inval, 1, MPI_REAL, 0, 0, req, ierr)
CALL MPI_WAIT(req, status, ierr)
END DO
CALL MPI_ISEND(outval, 1, MPI_REAL, 0, 0, req, ierr)
CALL MPI_WAIT(req, status)
END IF
This routine is normally used to free persistent requests created with either MPI_Recv_init or MPI_Send_init and friends. However, it can
be used to free a request created with MPI_Irecv or MPI_Isend and friends; in that case the use can not use the test/wait routines on the
request.
It is permitted to free an active request. However, once freed, you can not use the request in a wait or test routine (e.g., MPI_Wait ).
ERRORS
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object.
Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for
I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be
used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.
SEE ALSO
MPI_Isend
MPI_Irecv
MPI_Issend
MPI_Ibsend
MPI_Irsend
MPI_Recv_init
MPI_Send_init
MPI_Ssend_init
MPI_Rsend_init
MPI_Test
MPI_Wait
MPI_Waitall
MPI_Waitany
MPI_Waitsome
MPI_Testall
MPI_Testany
MPI_Testsome
Open MPI 1.2 September 2006 MPI_Request_free(3OpenMPI)