Hi,
I am new to this forum and i would like to get help in this issue.
I have a file 1.txt as shown:
apple
banana
orange
apple
grapes
banana
orange
grapes
orange
....
Now i would like to search for pattern say apple or orange and then put a # at the beginning of the pattern... (2 Replies)
Hi,
I think you ppl did not get my question correctly, let me explain
I have 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
... (1 Reply)
I am trying to do some thing like this ..
In a file , if pattern found insert new pattern at the begining of the line containing the pattern.
example:
in a file I have this.
gtrow0unit1/gctunit_crrownorth_stage5_outnet_feedthru_pin
if i find feedthru_pin want to insert !! at the... (7 Replies)
Hi all,
I am trying to extract the values ( text between the xml tags) based on the Order Number.
here is the sample input
<?xml version="1.0" encoding="UTF-8"?>
<NJCustomer>
<Header>
<MessageIdentifier>Y504173382</MessageIdentifier>
... (13 Replies)
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Hi,
I want to search a pattern in a text file and remove another pattern in that file.
my text file look like this
0.000000 1.970000 F 303 -
1.970000 2.080000 VH VH +
2.080000 2.250000 VH VH +
2.250000 2.330000 VH L -
2.330000 2.360000 F H +
2.360000 2.410000 L VL -
2.410000 ... (6 Replies)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
LEARN ABOUT CENTOS
ausearch_add_interpreted_item
AUSEARCH_ADD_INTERPRETED_ITEM(3) Linux Audit API AUSEARCH_ADD_INTERPRETED_ITEM(3)NAME
ausearch_add_interpreted_item - build up search rule
SYNOPSIS
#include <auparse.h>
int ausearch_add_interpreted_item(auparse_state_t *au, const char *field, const char *op, const char *value, ausearch_rule_t how);
DESCRIPTION
ausearch_add_interpreted_item adds one search condition to the current audit search expression. The search conditions can then be used to
scan logs, files, or buffers for something of interest. The field value is the field name that the value will be checked for. The op vari-
able describes what kind of check is to be done. Legal op values are:
exists
just check that a field name exists
=
locate the field name and check that the value associated with it is equal to the value given in this rule.
!=
locate the field name and check that the value associated with it is NOT equal to the value given in this rule.
The value parameter is compared to the interpreted field value (the value that would be returned by auparse_interpret_field(3)).
The how value determines how this search condition will affect the existing search expression if one is already defined. The possible val-
ues are:
AUSEARCH_RULE_CLEAR
Clear the current search expression, if any, and use only this search condition.
AUSEARCH_RULE_OR
If a search expression E is already configured, replace it by (E || this_search_condition).
AUSEARCH_RULE_AND
If a search expression E is already configured, replace it by (E && this_search_condition).
RETURN VALUE
Returns -1 if an error occurs; otherwise, 0 for success.
SEE ALSO ausearch_add_expression(3), ausearch_add_item(3), ausearch_add_timestamp_item(3), ausearch_add_regex(3), ausearch_set_stop(3), ause-
arch_clear(3), ausearch_next_event(3), ausearch-expression(5).
AUTHOR
Steve Grubb
Red Hat Nov 2007 AUSEARCH_ADD_INTERPRETED_ITEM(3)