Hi All,
I have an input below. I tried to use the awk below but it seems that it ;s not working. Can anybody help ?
My concept here is to find the 2nd field of the last occurrence of such pattern " ** XXX ccc ccc cc cc ccc 2007 " . In this case, the 2nd field is " XXX ". With this "XXX" term... (20 Replies)
i have an awk statement which i am using to count the number of occurences of the number ,5, in the file:
awk '/,5,/ {count++}' TRY.txt | awk 'END { printf(" Total parts: %d",count)}'
i know there is a total of 10 matches..what is wrong here?
thanks (16 Replies)
Hi
I have files with names that contain the date in several formats as, YYYYMMDD, DD-MM-YY,DD.MM.YY or similar combinations.
I know if a file fits in one pattern or other, but i donīt know how to extract the substring contained in the file that matches the pattern.
For example, i know that
... (1 Reply)
but keep if does not
I have a file: --> my.out
foo: bar
foo: moo
blarg
i am on vacation
foo: goose
foo: lucy
foo: moose
foo: stucky
groover@monkey.org
foo: bozo
grimace@gonzo.net
dear sir - blargo blargo
foo: goon
foo: sloppy
foo: saudi
gimme gimme gimme (3 Replies)
Hi,
I'm having trouble pulling out columns where the headers match a file of key ID's I'm interested in and was looking for some help.
file1.txt
I
Name
34
56
84
350
790
1215
1919
7606
9420
file2.txt
I Name 1 1 2 2 3 3 ... 34 34... 56 56... 84 84... 350 350...
M 1 A A A A... (20 Replies)
Hi,
I have a test file name test.txt with its contents
string
21345
qwee
strinn
strriin
striin
i need to delete all the words except the word STRING
I used the command
cat test.txt | sed 's/^..*$/**/g'
but the output entries still contain
strinn
strriin
striin.
Plz Help me out.... (5 Replies)
To match range, the command is:
awk '/BEGIN/,/END/'
but what I want is the range is printed only if there is additional pattern that matches in the range itself? maybe like this:
awk '/BEGIN/,/END/ if only in that range there is /pattern/'
Thanks (8 Replies)
I sat down yesterday to write this script and have just realised that my methodology is broken........
In essense I have.....
----------------------------------------------------------------- (This line really is in the file)
Service ID: 12345 ... (7 Replies)
Hi
I have a big text file. I want to extract all the sentences that matches at least 70% (seventy percent) of the words from each sentence based on a word list called A.
Say the format of the text file is as given below:
This is the first sentence which consists of fifteen words... (4 Replies)
Hi all,
I have file on which I do grep on "/tmp/data" then I get 5 lines as
dir Path: /tmp/data/20162343134
Starting to listen on ports logging:
--
Moving results files from local storage: /tmp/resultsFiles/20162343134/*.gz to NFS: /data/temp/20162343134/outgoing
from above got to get... (7 Replies)
Discussion started by: girijajoshi
7 Replies
LEARN ABOUT HPUX
evmeventnamematch
EvmEventNameMatch(3) Library Functions Manual EvmEventNameMatch(3)NAME
EvmEventNameMatch(), EvmEventNameMatchStr() - match EVM event name
SYNOPSIS
Library
EVM Support Library
Parameters
pattern The event name pattern sought. The pattern may be any valid event name string. It may include wildcard characters in place
of any component.
event The event containing the event name to be compared against the pattern.
match The result of the match. This operand is set to if the name matches the pattern, and to if it does not.
candidate A character string to be matched against the pattern
DESCRIPTION
Because special matching rules apply when deciding whether a candidate event name matches a known name, the EVM name matching functions
should be used for matching purposes, rather than the C string comparison functions The EVM functions match an event name against a sup-
plied pattern, ignoring any trailing appended components in the candidate name, and correctly matching wildcard characters.
The function takes an event and an event name pattern as input, and returns an indication of whether the event contains a name which
matches the pattern in the match output argument. The pattern may be any valid event name string, and may also include wildcard characters
in place of any component. A wildcard in the pattern matches zero or more name components. A matches exactly one component. A match
occurs if the event name matches all components indicated by the pattern, even if the name has additional trailing elements.
The function performs the same check as but takes a character string as the candidate event name, instead of extracting the candidate event
name from a supplied event.
Both functions set the match output argument to if the name matches the pattern, and to if it does not.
RETURN VALUE
The operation completed without error. The comparison was successful. The value of the match operand indicates whether the name matches
the pattern.
One of the arguments to the function is invalid.
The supplied pattern contains invalid characters.
The supplied event does not contain a name.
ERRORS
The value of is not set.
SEE ALSO
Routines
memccpy(3C), strcat(3C).
Event Management
EVM(5).
EVM Events
EvmEvent(5).
EvmEventNameMatch(3)