All,
Here is what I am searching for using sed.
1 00640000106798
I want to replace that with the following.
8 0064B0000106798
I can do this easy enough from the command line using sed but I need to put the search string in a file and then execute the sed command within a... (2 Replies)
Hello,
I have a file and in that, I want to search for a aprticular word and then replace another word in the same line with something else.
Example: In file abc.txt, there is a line
<host oa_var="s_hostname">test</host>
I want to search with s_hostname text and then replace test with... (2 Replies)
I have file with multiple columns. Column values for a record may be same.
Now i have to replace a column value(this can be same for the other columns) with new value.
File.txt
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D... (1 Reply)
Need help with either sed or awk to acheive the following
file1
-----
In the amazon forest
The bats eat all the time...
mon tue wed they would eat berries
In the tropical forest
The bats eat all the time...
on wed bats eat nuts
In the rain forest
The bats eat all the time...
on... (2 Replies)
I have a file
DS1
DDS
DS
I want to replace only "DS" to "DSmail.blah.com" in a lot of files. I tried
sed 's/DS/DSmail.blah.com' but it changes all the lines .
thanks in advance (2 Replies)
Hi All,
I need help in manipulating the data in first column in a file.
The sample data looks like below,
Mon Jul 18 00:32:52 EDT 2011,NULL,UAT
Jul 19 2011,NULL,UAT
1] All field in the file are separated by ","
2] File is having weekly data extracted from database
3] For eg.... (8 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
I have a file example.txt as follows :SomeTextGoesHere
$$TODAY_DT=20140818
$$TODAY_DT=20140818
$$TODAY_DT=20140818I need to automatically update the date (20140818) in the above file, by getting the new date as argument, using a shell script.
(It would even be better if I could pass... (5 Replies)
Hello.
I would like to search exactly "string1.string2.string3" and replace it by "new_string1.new_string2.new_string3"
And
I would like to search exactly "string2.string3" and replace it by "new_string2.new_string3"
And
I would not found in the result : "string1.new_string2.new_string3"... (3 Replies)
I wanted to search for a string and replace it with other string from nth column of a file which is comma seperated which I am able to do with below
# For Comma seperated file without quotes
awk 'BEGIN{OFS=FS=","}$"'"$ColumnNo"'"=="'"$PPK"'"{$"'"$ColumnNo"'"="'"$NPK"'"}{print}' ${FileName} ... (5 Replies)
Discussion started by: Amit Joshi
5 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)