09-01-2009
Hi.
ACL* means AC and zero or more L's.
Because you've used the -i (ignore case) it will find any combination of ac, aC Ac, AC, etc. with or without an L (or l)
If you want to find ACL followed by anything, use ACL.*
(and I would use grep -E instead of egrep)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'd like to grep a pattern of a version number as
*_number.number.number
number should be digit
my grep is
|egrep '^*++\.+'
It works for V_3.2.1 or V _5.3.2 but not with V_43.6.543 !!!!!
How can I specify any repetition of digit in the ?
thanks, (4 Replies)
Discussion started by: annelisa
4 Replies
2. Shell Programming and Scripting
Hi All,
I am having a query regarding the usage of egrep command.
i am having two unix environmanets in environment when i am using
"egrep -f" it is working fine and other unix environment i am getting a syntax error.
Please let me know if i need to set any environmane variables.
... (12 Replies)
Discussion started by: Sriram.Vedula53
12 Replies
3. Shell Programming and Scripting
Dear All,
I want to get the rows from file1.txt whose first column is exactly as the numbers (not subset) from file1.txt. so, i have to read by line from file1.txt and search in file2.txt. So the first column of the output must be the same as the file1.txt.
I used
% egrep -w -f... (5 Replies)
Discussion started by: senayasma
5 Replies
4. Shell Programming and Scripting
Hi All,
Here is my question.
I have two files, file1.txt and file2.txt. I need the line number (index number) of file2.txt where the words in file1.txt appear. But they have to be in the same order as file1.txt. In example,
file1.txt
Z
K
A
...
T
file2.txt
W
A
Q
R (6 Replies)
Discussion started by: senayasma
6 Replies
5. Shell Programming and Scripting
cat /tmp/inventory.csv|grep AARP|egrep -v "T11|12.4\(7\)"
how do i exclude in addition to above 12.4\(3\)
I have tried adding this in i.e
-v "T11|12.4\(7\)|12.4\(3\)"
but it did not work (3 Replies)
Discussion started by: slashbash
3 Replies
6. Shell Programming and Scripting
Hello folks,
Here's how my current egrep command works:
egrep "NY|DC|LA|VA|MD" state_data.txt
I am planning to use a file to enter all allowable state values like say a new state_names.lookup with the following data:
NY
DC
LA
VA
MD
egrep "`cat state_names.lookup`"... (6 Replies)
Discussion started by: calredd
6 Replies
7. Shell Programming and Scripting
Hi Guys,
I need hepl on egrep commnad
I have one file and i need grep only specific lines..
EX:
2012-04-01 02:15:14 w
2012-04-01 02:15:14 w
2012-04-01 02:15:14 w
2012-10-26 02:15:14 w
2012-04-01 02:15:14 w
2012-10-26 02:15:14 w
2012-10-26 02:15:14 w
2012-10-26 03:18:56 M... (1 Reply)
Discussion started by: asavaliya
1 Replies
8. UNIX for Advanced & Expert Users
I have a source file which is something like :
C/*M/ / ***HMACCT ** MONTH FOR CURRENT MINUS 14 CAL DAY
C/*D/ / ***HMACCT ** DAY FOR CURRENT MINUS 14 CAL DAY
C/*X/ / ***HMACCT ** CENTURY FOR CURRENT MINUS 14 CAL DAY
C/*Y/ / ***HMACCT **... (5 Replies)
Discussion started by: gotamp
5 Replies
9. UNIX for Beginners Questions & Answers
my file is below
REREGISTER is something to Failed to create the request
Failed to create the request in not easy
I know how REREGISTERcommand i run is
egrep 'REREGISTER|Failed|to|create|the|request' test1
expected output
REREGISTER is something to Failed to create the request
i should... (2 Replies)
Discussion started by: mirwasim
2 Replies
10. Shell Programming and Scripting
Hello guys,
I have an issue when trying to do an egrep -v on a file, let me show you.
I want to filter the last column as to where it filters out the columns with asterisks and zeros ( * and 0 ) it is working properly up to a certain point where I have a value of '10000' which is also getting... (3 Replies)
Discussion started by: evergreen
3 Replies
LEARN ABOUT SUNOS
aclcheck
aclcheck(3SEC) File Access Control Library Functions aclcheck(3SEC)
NAME
aclcheck - check the validity of an ACL
SYNOPSIS
cc [ flag... ] file... -lsec [ library... ]
#include <sys/acl.h>
int aclcheck(aclent_t *aclbufp, int nentries, int *which);
DESCRIPTION
The aclcheck() function checks the validity of an ACL pointed to by aclbufp. The nentries argument is the number of entries contained in
the buffer. The which parameter returns the index of the first entry that is invalid.
The function verifies that an ACL pointed to by aclbufp is valid according to the following rules:
o There must be exactly one GROUP_OBJ ACL entry.
o There must be exactly one USER_OBJ ACL entry.
o There must be exactly one OTHER_OBJ ACL entry.
o If there are any GROUP ACL entries, then the group ID in each group ACL entry must be unique.
o If there are any USER ACL entries, then the user ID in each user ACL entry must be unique.
o If there are any GROUP or USER ACL entries, then there must be exactly one CLASS_OBJ (ACL mask) entry.
o If there are any default ACL entries, then the following apply:
o There must be exactly one default GROUP_OBJ ACL entry.
o There must be exactly one default OTHER_OBJ ACL entry.
o There must be exactly one default USER_OBJ ACL entry.
o If there are any DEF_GROUP entries, then the group ID in each DEF_GROUP ACL entry must be unique.
o If there are any DEF_USER entries, then the user ID in each DEF_USER ACL entry must be unique.
o If there are any DEF_GROUP or DEF_USER entries, then there must be exactly one DEF_CLASS_OBJ (default ACL mask) entry.
o If any of the above rules are violated, then the function fails with errno set to EINVAL.
RETURN VALUES
If the ACL is valid, alcheck() will return 0. Otherwise errno is set to EINVAL and return code is set to one of the following:
GRP_ERROR There is more than one GROUP_OBJ or DEF_GROUP_OBJ ACL entry.
USER_ERROR There is more than one USER_OBJ or DEF_USER_OBJ ACL entry.
CLASS_ERROR There is more than one CLASS_OBJ (ACL mask) or DEF_CLASS_OBJ (default ACL mask) entry.
OTHER_ERROR There is more than one OTHER_OBJ or DEF_OTHER_OBJ ACL entry.
DUPLICATE_ERROR Duplicate entries of USER, GROUP, DEF_USER, or DEF_GROUP.
ENTRY_ERROR The entry type is invalid.
MISS_ERROR Missing an entry. The which parameter returns -1 in this case.
MEM_ERROR The system cannot allocate any memory. The which parameter returns -1 in this case.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
acl(2), aclsort(3SEC), attributes(5)
SunOS 5.10 10 Dec 2001 aclcheck(3SEC)