I'm attempting to compare the contents of two files that are not identical on a Solaris 10 box. We are under audit and I need to do some comparisons of our application accounts with our unix accounts. I essentially want to pull a line from one file and search the second for an equal entry. I cannot use diff since it will just tell me every line is different. Here is the section that is giving me trouble:
For some reason the contents of $i are getting inserted into the file on a single line. When I try to echo the contents of $i prior to the assignment of the $lower variable I get nothing as if it's blank, yet if I echo out the contents of $lower I get the same one line list of values. I think this is what is messing up my grep statement.
Anybody have pointers. I'm sure this code is spotty and needs some re-working.
I am wanting to test the output from a script. If the out put = Object does not exist. I need to delete the output file.
I am using , filecontents=`grep -i Object does not exist. $1.txt`
then I test the variable with,
if ; then
delete file
But I get an error, grep: can't open... (5 Replies)
Hi,
I'd like to grep a variable that I saved in the program.
Like
grep '0\$variable1' file1
Does someone know what's wrong with this command?
Thanks a lot! (2 Replies)
Hello! I think this should be an easy solution. I have a large file with many fields of data. The first field has a unique identifier (a subject number) for every record for a chunk of data. Something like this:
There were ten experimental conditions (ec), but the ec is identified by only... (11 Replies)
All I want to do is find out if the string 'NO' is in a file by checking for a return code of 0 if there is a match. The grep works fine on the command line directly naming the file but I am obviously not using the correct syntax within the shell script as I consistently get the error message
... (5 Replies)
how can I use grep with a variable to find a value?
cat data.out
Hello World
grep "Hello World" data.out
Hello World ## Value found
I want to do something like this but can't seem to get it to work any
suggestions would be appreciated.
var="Hello World"
grep $var data.out (3 Replies)
I want to search a text in file but that file is pointing to variable.
ex:
file=there was nothing special
grep "there was nothing" $file
but its not working . Can u let me know that how we can use variable($file) in grep command.
Please use code tags (6 Replies)
I have a pattern like:
column "5" is missing
PS: the no is in double quotes.
The number usally changes, so we use a loop to grep.
grep 'column "$number" is missing' filename.txt
But it is not working....
How to solve this? (2 Replies)
Hi,
I have a loop running until a variable L that is read previously in the full script. I'd like to grep some information in an input file at a line that contains the value of the loop parameter $i.
I've tried to use grep, but the problem is nothing is written in the FILE files. It seems grep... (5 Replies)
Hi,
I am looking for the following:
1. A command to 'grep' the variable from a file
2. And check whether the entered variable is empty in that file
I have a file as given below:
IAGLOBAL_USERID=admin
I want to check with a whether the variable contains a value, say here its admin if... (2 Replies)
I've got a file that I'm trying to grep through that looks like this:
alpha1
alpha2
alpha3
beta1
beta2
gamma5
gamma6
gamma7
gamma8
gamma9
and I want the output to only contain the line with the highest value for each, so the output I want is:
alpha3
beta2
gamma9
I also need... (11 Replies)
Discussion started by: tiberione
11 Replies
LEARN ABOUT SUNOS
create-audit-module
asadmin-create-audit-module(1AS) User Commands asadmin-create-audit-module(1AS)NAME
asadmin-create-audit-module, create-audit-module - adds an audit-module
SYNOPSIS
create-audit-module --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename]
[--terse=false] [--echo=false] [--interactive=true] --classname realm_class [--property (name=value)[:name=value]*] audit_module_name
Adds the named audit module for the plugin module that implements the audit capabilities. This command is supported in remote mode only.
OPTIONS --user authorized domain application server administrative username.
--password password to administer the domain application server.
--host machine name where the domain application server is running.
--port port number of the domain application server listening for administration requests.
--secure if true, uses SSL/TLS to communicate with the domain application server.
--passwordfile file containing the domain application server password.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script. Default is false.
--echo setting to true will echo the command line statement on the standard output. Default is false.
--interactive if set to true (default), only the required password options are prompted.
--classname Java class which implements this realm.
--property optional attributes name/value pairs of provider implementation specific attributes.
OPERANDS
audit_module_name name of this audit module.
Example 1: Using create-audit-module
asadmin> create-audit-module --user admin1 --password adminadmin1
--host pigeon --port 5001 --classname com.sun.appserv.auditmodule
--property defaultuser=admin:Password=admin sampleAuditModule
Command create-audit-module executed successfully
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-delete-audit-module(1AS), asadmin-list-audit-modules(1AS)J2EE 1.4 SDK March 2004 asadmin-create-audit-module(1AS)