Hello!
I wish to extract the pid where CPU is above 10%
last pid: 22621; load averages: 4.71, 5.04, 5.13 15:08:34
221 processes: 212 sleeping, 2 running, 1 stopped, 6 on cpu
CPU states: %... (3 Replies)
I want to find the top N entries for a certain field based on the values of another field.
For example if N=3, we want the 3 best values for each entry:
Entry1 ||| 100
Entry1 ||| 95
Entry1 ||| 30
Entry1 ||| 80
Entry1 ||| 50
Entry2 ||| 40
Entry2 ||| 20
Entry2 ||| 10
Entry2 ||| 50... (1 Reply)
Hi I am posting here for the first time. I am trying to write a script that reads a data file and tries to determine if any absolute values that are above 0.5
I was thinking it ought to be possible to do this with awk somehow. Are there any suggestions before I start reinventing the wheel?
... (4 Replies)
Hi,
I've a pipe delimited file and wanted to replace the 3rd field to 099990 where the values are null. How can I achieve it using awk or sed.
20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S
20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S... (12 Replies)
Hi All,
i have a file like
col1 col2 col3
13 24 NA
12 13 14
11 12 13
14 22 NA
18 26 NA
in this file if i found "NA" other values in the line are also replace by NA
Could you help me! (7 Replies)
data.txt
August 09 17:16 2013
August 09 17:17 2013
August 09 17:19 2013
August 09 17:20 2013
August 09 17:21 2013
August 09 17:22 2013
August 09 17:23 2013
August 09 17:24 2013
to print from a point in this file, to the end of the file, i type:
awk '/August 09 17:22/,0' data.txt.
... (1 Reply)
Hi,
i need to find one of the value from my file is in between two numbers, that is the value is greater than 34 and smaller than 50,
Ex: File.txt
col1 col2 col3 col4
1 Name1 93 w
2 Name2 94 a
3 Name3 32 b
4 Name4 45 x
5 Name5 50 y
6 Name6 49 z
here i need to find col3 values are... (7 Replies)
Unix File is pipe delimited with 17 fields. We may get extra pipes in data also.
We may get \n char (1 or more \n in one field or multi fileds) in data in any field.
Need to replace \n true ( line separator) with 'space and bell char space' chars (' \a ') Not data \n.
Input:... (1 Reply)
Discussion started by: rajeshkumare
1 Replies
LEARN ABOUT SUSE
ausearch_add_item
AUSEARCH_ADD_ITEM(3) Linux Audit API AUSEARCH_ADD_ITEM(3)NAME
ausearch_add_item - build up search rule
SYNOPSIS
#include <auparse.h>
int ausearch_add_item(auparse_state_t *au, const char *field, const char *op, const char *value, ausearch_rule_t how);
DESCRIPTION
ausearch_add_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 variable
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 uninterpreted field value.
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_interpreted_item(3), ausearch_add_timestamp_item(3), ausearch_add_regex(3), ausearch_set_stop(3),
ausearch_clear(3), ausearch_next_event(3), ausearch-expression(5).
AUTHOR
Steve Grubb
Red Hat Nov 2007 AUSEARCH_ADD_ITEM(3)