I have a file that will sometimes contain a pattern. The pattern is this:
W/D FRM CHK 00
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (1 Reply)
I have a file that will sometimes contain a pattern. The pattern is this:
FRM CHK 0000
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (4 Replies)
#!/usr/bin/perl
use Shell;
open THEFILE, "C:\galileo_integration.txt" || die "Couldnt open the file!";
@wholeThing = <THEFILE>;
close THEFILE;
foreach $line (@wholeThing){
if ($line =~ m/\\0$/){
@nextThing = $line;
if ($line =~ s/\\0/\\LATEST/g){
@otherThing =... (2 Replies)
Hi,
I have created one shell script in which it will count number of "~" tilda charactors from each line of the file.But the problem is that i need to count each line count individually, that means. if line one contains 14 "~"s and line two contains 15 "~"s then it should give an error msg.each... (3 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 have a directory of files, each with a variable (though small) number of lines. I would like to go through each line in each file, and print the:
-file name
-line number
-number of matches to the pattern /comp/ for each line.
Two example files:
cat... (4 Replies)
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Hello,
I have been working on Awk/sed one liner which counts the number of occurrences of '|' in pipe separated lines of file and delete the line from files if count exceeds "17".
i.e need to get records having exact 17 pipe separated fields(no more or less)
currently i have below :
awk... (1 Reply)
rbacdbchk(1M)rbacdbchk(1M)NAME
rbacdbchk - Verifies the syntax of the Role-Based Access Control (RBAC) database files
SYNOPSIS DESCRIPTION
verifies that there are no conflicting or inconsistent entries in and amongst the RBAC database files. also checks the syntax of the data-
base files and prints messages indicating which lines contain errors. returns zero output if no errors are present in the database files.
All the RBAC database files and are verified. See rbac(5) for more information on these RBAC database files.
Options
supports the following options:
Checks the
database.
Checks the
database.
Checks the
database.
Checks the
database.
Checks the
database.
Cross reference checks all databases.
EXTERNAL INFLUENCES
Environment Variables
determines the language in which messages are displayed.
International Code Set Support
Single-byte character code set is supported.
RETURN VALUE
0. Success
1. Incorrect syntax
EXAMPLES
The following example finds an error that user is an invalid user
# rbacdbchk
[/etc/rbac/user_role] John: Administrator
invalid user
The value 'John' for the Username field is bad.
The following example finds a syntax error, an extra colon at the end of a line:
# rbacdbchk
[/etc/rbac/user_role] root: Administrator:
invalid name: Not alphanumeric
The value 'Administrator:' for the Rolename field is bad.
[Role in role_auth DB with no assigned user in user_role DB]
Administrator:(hpux.*, *)
The following example finds a field missing:
# rbacdbchk
[/etc/rbac/roles] : my comment
invalid name: <empty>
The value '' for the Rolename field is bad.
The following example finds a bad role:
# rbacdbchk
[Role in role_auth DB with no assigned user in user_role DB]
blah:(hpux.*, *)
[Invalid Role in role_auth DB. Role 'blah' does not exist in the roles DB]
blah:(hpux.*, *)
The following example finds a bad group name:
# rbacdbchk
[/etc/rbac/user_role] &blah: Administrator
invalid group
The value 'blah' for the Group name field is bad.
FILES
Database containing valid definitions of all roles.
Database containing definitions of all valid authorizations.
Database specifying the roles for each specified user.
Database that defines the authorizations for each role.
Database containing the authorization to execute specified commands,
and the privileges to alter uid and gid for command execution.
Database that defines the role-to-authorization to audit
SEE ALSO authadm(1M), cmdprivadm(1M), privrun(1M), rbac(5).
rbacdbchk(1M)