Unix Gurus,
I have been breaking my head to get this done..seems simple..
I need to read a flat file and based on a key word in a line, i need to skip the previous 3 lines.
eg :
Line1
Line2
Line3
Line4
Line5
Line6
Error
Line7
Line8
Line9
Error
Line10 (4 Replies)
Hello,
With next simple command line I get all allocated semaphore numbers:
ipcs -s | awk 'NR > 3 {print $2}'
Now I want to add ipcrm -s before each semaphore id and actually delete every last of them.
The question is: Can I do the operation in a command itself, without redirecting awk... (2 Replies)
Hi,
I'm not sure, there is solution exist for this problem. I'm facing problem in calling a unix script from awk code. Here is code
nawk -F'=' '
BEGIN { }
function runtest(string)
{
LINE
}
/^/ { # getting module name
t=$1
module=substr(t,2,(length(t)-2))
runtest(module)
}... (1 Reply)
hi there
I have a view which is working fine, but i have been told that i need to make sure the resulting output excludes all rows with nic_status equal to the string "removed".
Does anybody know in which part of the code below i would place the conditional ...
WHERE nic_status !=... (4 Replies)
Hi All,
How do we call a method existing in another file inside awk.
After matching a pattern i want to call a method secureCopy that exists in another file, but method not getting called:
ls -l |
awk -v var2=$servername -v var1=$srcserverpath -v var3=$tgtpath '... (1 Reply)
Database
rina lives:fatin:20:20:20
rina:fatin:20:20:20
i am having a small problem in extracting out the information from the database. For example, if i were to input a book titled rina into my search , i would only want it to display the row which has the title rina, like this
... (4 Replies)
I am trying to call awk from a csh script using
awk '{print $1, -$2, $3}' $fvmod.vel > $fvmod.xzv
and getting awk: Command not found.
Running
awk '{print $1, -$2, $3}' $fvmod.vel > $fvmod.xzv
on the command line with the actual filenames works (2 Replies)
I have to call two awk scripts where the second one used the output from the first one. Am wondering if it may happen that the second awk might start before the first awk finished creating the file...
if ($nAnomaly == 1) then
awk -v anomaly=$Anom -v zloc="$zmin/$zmax" -v dz=$dz \
... (1 Reply)
I want to run awk from php to do some text processing. I am giving an extremely simple example below:
onecol.awk file
-------------------
{
print "Hello!";
}
f1.txt
---------
aaa
ccc
eee
f2.txt
--------- (6 Replies)
Hello I have the file df.tmp
FS is actually the / FS but escape character\ and end of line $ is used in order to fetch exctly / and not other filesystems.
awk '/\/$/ {print $(NF-1)+0}' df.tmp will work properly and return a value eg. 60
but when I am trying to issue the command with the array... (3 Replies)
Discussion started by: drbiloukos
3 Replies
LEARN ABOUT OSX
mpi_group_difference
MPI_Group_difference(3OpenMPI)MPI_Group_difference(3OpenMPI)NAME
MPI_Group_difference - Makes a group from the difference of two groups.
SYNTAX C Syntax
#include <mpi.h>
int MPI_Group_difference(MPI_Group group1, MPI_Group group2,
MPI_Group *newgroup)
Fortran Syntax
INCLUDE 'mpif.h'
MPI_GROUP_DIFFERENCE(GROUP1, GROUP2, NEWGROUP, IERROR)
INTEGER GROUP1, GROUP2, NEWGROUP, IERROR
C++ Syntax
#include <mpi.h>
static Group Group::Difference(const Group& group1, const Group& group2)
INPUT PARAMETERS
group1 First group (handle).
group2 Second group (handle).
OUTPUT PARAMETERS
newgroup Difference group (handle).
IERROR Fortran only: Error status (integer).
DESCRIPTION
The set-like operations are defined as follows:
o union -- All elements of the first group (group1), followed by all elements of second group (group2) that are not in the first group
o intersect -- all elements of the first group that are also in the second group, ordered as in first group
o difference -- all elements of the first group that are not in the second group, ordered as in the first group
Note that for these operations the order of processes in the output group is determined primarily by order in the first group (if possible)
and then, if necessary, by order in the second group. Neither union nor intersection are commutative, but both are associative.
The new group can be empty, that is, equal to MPI_GROUP_EMPTY.
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_Group_free
Open MPI 1.2 September 2006 MPI_Group_difference(3OpenMPI)