Hi all,
I want to display line number for matching string in a file. can anyone please help me.
I used
grep -n "ABC" file
so it displays
6 ABC.
But i only want to have line number,i don't want that it should prefix matching context with line number.
Actually my original... (10 Replies)
Hi folks
I am not allowed to install GNU grep on AIX.
Here my code excerpt:
grep_fatal () {
/usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP"
}
Howto the same on AIX based machine?
from manual GNU grep
‘--after-context=num’
Print num lines of trailing context after... (4 Replies)
Hi,
I am trying to locate the occurences of certain pattern like 'Possible network disconnect' in a text file. I can get the actual lines matching the pttern using:
grep -w 'Possible network disconnect' file_name.
But I am more interested in getting the timing of these events which are... (7 Replies)
I have a file with the below format,
GS*8*****
ST*1********
A*
B*
E*
RMR*123455(This is the unique number to locate this row)
F*
SE*1***
GE**
GS*9*****
ST*2
H*
J*
RMR*567889(This is the unique number to locate this row)
L*
SE*
GE***** (16 Replies)
Hi,
I need to make a script to extract the number that are not in a file.
Example:
I have file-A that has 100000 (70000-799999) numbers. And a file-B with number that already are in the system. Now I need to know/get the numbers that are not in system.
I was thinking something like this:... (5 Replies)
Request: grep to find given matching patern and return unique values, eliminate the duplicate values
I have to retrieve the unique folder on the below file contents like;
/app/oracle/build_lib/pkg320.0_20120927
/app/oracle/build_lib/pkg320.0_20121004_prof... (5 Replies)
I need to search for two patterns in a file and find number of matching lines.
find . -type f | xargs grep "DROP TABLE" | wc -l
find . -type f | xargs grep "DROP SYNONYM" | wc -l
The above code works. However I am looking at finding a commnd that will simplify as on a singe command... (2 Replies)
Hi,
here are few lines present in the logs. I want to grep on Error and print few lines before and after Error word is found
line1
Line2
Line3
Error
Line4
Line5
Line6
Line7
I want the output to be
Line2
Line3
Error
Line5 (1 Reply)
Discussion started by: arghadeep adity
1 Replies
LEARN ABOUT CENTOS
avc_compute_member
avc_compute_create(3) SELinux API documentation avc_compute_create(3)NAME
avc_compute_create, avc_compute_member - obtain SELinux label for new object
SYNOPSIS
#include <selinux/selinux.h>
#include <selinux/avc.h>
int avc_compute_create(security_id_t ssid, security_id_t tsid,
security_class_t tclass, security_id_t *newsid);
int avc_compute_member(security_id_t ssid, security_id_t tsid,
security_class_t tclass, security_id_t *newsid);
DESCRIPTION
avc_compute_create() is used to compute a SID to use for labeling a new object in a particular class based on a SID pair. This call is
identical to security_compute_create(), but does not require converting from userspace SID's to contexts and back again.
avc_compute_member() is used to compute a SID to use for labeling a polyinstantiated object instance of a particular class based on a SID
pair. This call is identical to security_compute_member(), but does not require converting from userspace SID's to contexts and back
again.
These functions return a SID for the computed context in the memory referenced by sid.
RETURN VALUE
On success, zero is returned. On error, -1 is returned and errno is set appropriately.
ERRORS
EINVAL The tclass and/or the security contexts referenced by ssid and tsid are not recognized by the currently loaded policy.
ENOMEM An attempt to allocate memory failed.
AUTHOR
Eamon Walsh <ewalsh@tycho.nsa.gov>
SEE ALSO avc_init(3), avc_context_to_sid(3), security_compute_create(3), selinux(8)
30 Mar 2007 avc_compute_create(3)