03-11-2014
Dear ahamed101
Thansk a lot for your help,, the scrip works fine. but theres ias a problem in
has "cnt[i]" It always give a value 1?
for example in the ID 2470121241 shouldbe 2 times status 14 not only 1 time?
Please can you help me.
Thanks again
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I'm attempting to search, using awk, a pattern range in a file. Something like:
>awk '/first bit of text.../,/...last bit of text/' file
Is it possible to print only the last (or first) occurrence of the pattern range this way?
Thanks for any suggestions.
Al (2 Replies)
Discussion started by: agibbs
2 Replies
2. Shell Programming and Scripting
HPUX /bin/sh (posix)
I have a file as such
cat dog mouse
deer elk rabbit
mouse rat pig
I would like to replace the second occurrence of mouse in this file with mouse2. The rest of the file has to stay exactly as is. I'm not sure exactly where mouse might be (could be first,second,third... (5 Replies)
Discussion started by: lyoncc
5 Replies
3. Shell Programming and Scripting
I am looking to get a output of "2 apple found" from the awk command below.
black:34104 tomonorisoejima$ cat tomo
apple apple
black:34104 tomonorisoejima$ awk '/apple/ {count++}END{print count " apple found"}' tomo
1 apple found
black:34104 tomonorisoejima$ (5 Replies)
Discussion started by: soemac
5 Replies
4. Shell Programming and Scripting
Hi, I am new to linux and have a challenge while I am debugging my application logs n linux boxes.
our log file xxx.log will have different responses coming in its way while an user logs in. Each response might be of 2000 lines or more. Many users do login at a time and our log file goes big... (24 Replies)
Discussion started by: nariwithu
24 Replies
5. UNIX for Dummies Questions & Answers
hi,
My input is:
123
1234|123|123|123
123|123|456
123|123|12
12
Expected output is:
123
1234|123
123|123
123|123
456
123|123
12 (1 Reply)
Discussion started by: pandeesh
1 Replies
6. Shell Programming and Scripting
: i need a bash script to convert the displayed output
12
14
15
12
15
13
to
12 * 2 ,13 * 1,14*1,15*1
Thanks,
nevil (2 Replies)
Discussion started by: nevil
2 Replies
7. UNIX for Dummies Questions & Answers
How to find last occurrence of a keyword in a file using sed. (4 Replies)
Discussion started by: nexional
4 Replies
8. Shell Programming and Scripting
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)
Discussion started by: M Gruenstaeudl
4 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
I have file contents
/tmp/x/abc.txt
/home/bin/backup/sys/a.log
I need this output:
/tmp/x/
/home/bin/backup/sys/
Can somebody please help me out
Please use CODE tags as required by forum rules! (3 Replies)
Discussion started by: jhonnyrip
3 Replies
LEARN ABOUT REDHAT
pvm_notify
NOTIFY(3PVM) PVM Version 3.4 NOTIFY(3PVM)
NAME
pvm_notify - Request notification of PVM event such as host failure.
SYNOPSIS
C int info = pvm_notify( int what, int msgtag, int cnt, int *tids )
Fortran call pvmfnotify( what, msgtag, cnt, tids, info )
PARAMETERS
what Type of event to trigger the notification. Presently one of:
Value Meaning
PvmTaskExit Task exits or is killed
PvmHostDelete Host is deleted or crashes
PvmHostAdd New host is added
msgtag Message tag to be used in notification.
cnt For PvmTaskExit and PvmHostDelete, specifies the length of the tids array. For PvmHostAdd, specifies the number of times to
notify.
tids For PvmTaskExit and PvmHostDelete, an array of length cnt of task or pvmd TIDs to be notified about. The array is not used with
the PvmHostAdd option.
info Integer status code returned by the routine. Values less than zero indicate an error.
DESCRIPTION
The routine pvm_notify requests PVM to notify the caller on detecting certain events. One or more notify messages (see below) are sent by
PVM back to the calling task. The messages have tag msgtag supplied to notify.
The notification messages have the following format:
PvmTaskExit
One notify message for each TID requested. The message body contains a single TID of exited task.
PvmHostDelete
One notify message for each TID requested. The message body contains a single pvmd-TID of exited pvmd.
PvmHostAdd
cnt notify messages are sent, one each time the local pvmd's host table is updated. The message body contains an integer length
followed by a list of pvmd-TIDs of new pvmds. The counter of PvmHostAdd messages yet to be sent is replaced by successive calls to
pvm_notify. Specifying a cnt of -1 turns on PvmHostAdd messages until a future notify; a count of zero disables them.
TIDs in the notify messages are packed as integers.
The calling task is responsible for receiving messages with the specified tag and taking appropriate action.
Future versions of PVM may expand the list of available notification events.
EXAMPLES
C:
info = pvm_notify( PvmTaskExit, 9999, ntask, tids );
Fortran:
CALL PVMFNOTIFY( PVMHOSTDELETE, 1111, NUMHOSTS, DTIDS, INFO )
To "cancel" a notify request in PVM, the pvm_notify routine can be re-invoked with an additional PvmNotifyCancel flag in the what argument.
The remaining arguments to this cancelling invocation must match the original invocation exactly, aside from the additional PvmNotifyCancel
which can be added(+) or OR-ed(|) to the what argument:
pvm_notify( PvmTaskExit, 9999, ntask, tids );
. . .
pvm_notify( PvmTaskExit | PvmNotifyCancel, 9999, ntask, tids );
Note that when a notify is cancelled, the notify message is delivered, as if the given event (i.e. task exit, host add or delete) had
occurred.
ERRORS
PvmSysErr
pvmd not responding.
PvmBadParam
giving an invalid argument value.
SEE ALSO
pvm_tasks(3PVM), pvm_config(3PVM)
31 January, 1994 NOTIFY(3PVM)