10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I am trying to extract data based on certain conditions. My sample input file as below:-
lnc-2:1 OnePiece tra_law 500 688 1 . . g_id "R792.8417"# tra_law_id "R792.8417.1"# g_line "2.711647"# KM "8.723820"#
lnc-2:1 OnePiece room 500 510 1 . . g_id "R792.8417"# tra_law_id "R792.8417.1"#... (7 Replies)
Discussion started by: bunny_merah19
7 Replies
2. Shell Programming and Scripting
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
9 Replies
3. Shell Programming and Scripting
Hello every,
I am stuck in a problem. I have file like this. I want to add the fifth field of the match pattern line above the lines starting with "# @D". The delimiter is "|"
eg
>
# @D0.00016870300|0.05501020000|12876|12934|3||Qp||Pleistocene||"3 Qp Pleistocene"|Q
# @P... (5 Replies)
Discussion started by: jyu3
5 Replies
4. Homework & Coursework Questions
Florida State University, Tallahassee, FL, USA, Dr. Whalley, COP4342 Unix Tools.
This program takes much of my previous assignment but adds the functionality of printing the concatenated line numbers found within the input.
Sample input from <> operator:
Hello World
This is hello
a sample... (2 Replies)
Discussion started by: D2K
2 Replies
5. Shell Programming and Scripting
Hello Guyz
I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline
ABC
DEF
LMN
EFG
HIJ
LMN
OPQ
In the above text i need to... (8 Replies)
Discussion started by: RickCharles
8 Replies
6. Shell Programming and Scripting
hi dudes, I nee you kind assistance, I have to find the matched numbers from 2 text files and output of matched numbers should be in another text file..
I do have text files like this , for example
File 1
787
665*5-p
5454
545-p
445-p
5454*-p
File 2
5455
787
445-p
4356
2445
144
... (3 Replies)
Discussion started by: sureshraj
3 Replies
7. Shell Programming and Scripting
Hi:
Let's suppose I want to replace all the | by > ONLY when | is between . Usually (and it works) I would do something like
sed -e 's/\(\*\)|\(*\]\)/\1>\2/g'
where I have to "save" some portions of the matched region and use them with the \n metacharacter. I was wondering if I could... (2 Replies)
Discussion started by: islegmar
2 Replies
8. Shell Programming and Scripting
Hi all,
I just learnt Perl and I encountered a problem in my current project.
For a verilog file, i am required to write a PERL script that could match pattern to output nitrolink and nitropack. I wont know what name to grep except the pattern below.
the verilog file:
nitrolink nitrolink... (1 Reply)
Discussion started by: kimhuat
1 Replies
9. Solaris
Hi,
I have a sh script which contains the following line
TOTAL=$((e4-s4)) -> Where e4 and s4 are input got from the user.
At the time of execution of this line the following error occurs
test.sh: syntax error at line 8: `TOTAL=$' unexpected
How to solve this issue?. Can any... (9 Replies)
Discussion started by: krevathi1912
9 Replies
10. Shell Programming and Scripting
Could someone tell me how to perform calculations using numbers greater than 2150000000 in Korn Shell? When I tried to do it it gave me the wrong answer.
e.g. I have a ksh file with the contents below:
---------------------------------
#!/bin/ksh
SUM=`expr 2150000000 + 2`
PRODUCT=`expr... (3 Replies)
Discussion started by: stevefox
3 Replies
EvmEventNameMatch(3) Library Functions Manual EvmEventNameMatch(3)
NAME
EvmEventNameMatch, EvmEventNameMatchStr - Match event name
LIBRARY
EVM Support Library (libevm.so, libevm.a)
SYNOPSIS
#include <evm/evm.h>
EvmStatus_t EvmEventNameMatch(
const char *pattern,
EvmEvent_t event,
EvmBoolean_t *match);
EvmStatus_t EvmEventNameMatchStr(
const char *pattern,
const char *candidate,
EvmBoolean_t *match);
OPERANDS
The event name pattern sought. The pattern may be any valid event name string. It may include wildcard characters in place of any compo-
nent. The event containing the event name to be compared against the pattern. The result of the match. This parameter is set to EvmTRUE
if the name matches the pattern, and to EvmFALSE if it does not. 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 (memcpm(), strcmp()) . The EVM functions match an
event name against a supplied pattern, ignoring any trailing appended components in the candidate name, and correctly matching wildcard
characters.
The EvmEventNameMatch 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 compo-
nent. A match occurs if the event name matches all components indicated by the pattern, even if the name has additional trailing elements.
The EvmEventNameMatchStr function performs the same check as EvmEventNameMatch, but takes a character string as the candidate event name,
rather than extracting it from a supplied event.
Both functions set the match output argument to EvmTRUE if the name matches the pattern, and to EvmFALSE if it does not.
RETURN VALUES
The comparison was successful. The value of the match parameter indicates whether the name matches the pattern. The supplied pattern con-
tains invalid characters. The supplied event does not contain a name.
ERRORS
None
FILES
None
SEE ALSO
Routines: memccpy(3), strcat(3)
Event Management: EVM(5)
EVM Events: EvmEvent(5)
Programmer's Guide delim off
EvmEventNameMatch(3)