Sponsored Content
Full Discussion: help needed for a script!!
Top Forums Shell Programming and Scripting help needed for a script!! Post 302358700 by pravin27 on Sunday 4th of October 2009 07:19:22 AM
Old 10-04-2009
Hi Rahul,

This will work. But if you want exact match e.g. rules 123 in temp file then you have to
use -w option.

Thanks
Pravin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script needed

Hi I am looking for the script which can move 1month old data from a TXT file.actully in this file data is appended on daily basis.pleasehalp me out. Thanks in advance (3 Replies)
Discussion started by: vpandey
3 Replies

2. Shell Programming and Scripting

Script help needed

I have a code given below... ERROR=`grep "Job Status" ${LOG_FILE}` ERROR=${ERROR##*\(} ERROR=${ERROR%%\)*} if then echo "The job completed successfully" EXIT_STATUS=0 else echo "The job failed" EXIT_STATUS=1 fi can anybody tell me what is ERROR=${ERROR##*\(}... (1 Reply)
Discussion started by: Sagarddd
1 Replies

3. UNIX and Linux Applications

script needed

hi i am new to linux world please help me,i have two files in diff location i need to compare both and i need to see difference b/w them ex /media/txt (file1) xxxxxx xxxxxx xxxxx xxxxxx xxxxxx /media/rev/ (file2) rev is a folder which contains some files so i need to compare the files in... (3 Replies)
Discussion started by: revenna
3 Replies

4. Shell Programming and Scripting

Script needed!! - Please help

Hi All, I have a text file contains the follwoing info: HOST_CONFIG spbf1n01 3181 patrolpv "B6abbKEW5L1TCE5B282445" I E W A HOST_CONFIG spbf1n02 3181 patrolpv "B6abbKEW5L1TCE5B282445" I E W A HOST_CONFIG spbf1n03 3181 patrolpv "B6abbKEW5L1TCE5B282445" I E W A Whenever the String... (6 Replies)
Discussion started by: ntgobinath
6 Replies

5. Shell Programming and Scripting

Help Needed in Sh script

hi, Im trying to select from a sql using shell script and once i get count i need to add the count to the subject line and send mail to every1.. ex : Select count(*) from emp; In Shell script echo $PASSWORD|$ORACLE_HOME/bin/sqlplus $USERID@$DBNAME @$SCRIPT_DIR/emp_count.sql... (1 Reply)
Discussion started by: jkumsi
1 Replies

6. Shell Programming and Scripting

Expect script help needed- script failing if router unavailable

Hey all. Sometimes I'm tasked to change some router configs for the entire network (over 3,000 Cisco routers). Most of the time its a global config parameter so its done with a loop and an IP list as its the same configuration change for all routers. This is working OK. However, sometimes an... (3 Replies)
Discussion started by: mrkz1974
3 Replies

7. UNIX for Dummies Questions & Answers

help in script needed

Hi, I am developing a script for writing out the failed jobs in file, 1)First step i need to create an empty file Status with today's date. 2)After that i need to execute the below command: dsjob -server servername -user uname -password pwd -ljobs projectname This will listout all... (5 Replies)
Discussion started by: pandeesh
5 Replies

8. Shell Programming and Scripting

Help needed for script

Hi, I have a big list like this --> 3285 3289 328D 3291 3295 3299 329D 32A1 I need to make it like --> 3285|3289|328D|3291|3295|3299|329D|32A1 Please suggest. This is Linux OS. (8 Replies)
Discussion started by: solaris_1977
8 Replies

9. Shell Programming and Scripting

Help Needed on Script

Hi team, I am looking to execute some command through xargs. $cat testfile | grep myloc alias myloc='cd /export/nfs-1sv-23/' I am trying to execute that alias as soon as i cat and grep ? I tried with $cat testfile | grep myloc | xargs --> no luck ... Can some one assist me with... (6 Replies)
Discussion started by: itsme488
6 Replies

10. Homework & Coursework Questions

Help needed for a script

TAG flow Between SDR and DELTA SDR is the Source table. Delta is the target table having one staging table and one Main table. Tags flows between SDR and Delta through ER gateway. From SDR (SDR.CUSTOMER_PRODUCT and SDR.CUSTOMER_PRODUCT_RELATIONSHIP) the Tags flows to ER... (2 Replies)
Discussion started by: patitapaban
2 Replies
sesearch(1)						      General Commands Manual						       sesearch(1)

NAME
sesearch - SELinux policy query tool SYNOPSIS
sesearch [OPTIONS] RULE_TYPE [RULE_TYPE ...] [EXPRESSION] [POLICY ...] DESCRIPTION
sesearch allows the user to search the rules in a SELinux policy. POLICY
sesearch supports loading a SELinux policy in one of four formats. source A single text file containing policy source for versions 12 through 21. This file is usually named policy.conf. binary A single file containing a monolithic kernel binary policy for versions 15 through 21. This file is usually named by version - for example, policy.20. modular A list of policy packages each containing a loadable policy module. The first module listed must be a base module. policy list A single text file containing all the information needed to load a policy, usually exported by SETools graphical utilities. If no policy file is provided, sesearch will search for the system default policy: checking first for a source policy, next for a binary policy matching the running kernel's preferred version, and finally for the highest version that can be found. In the latter case, the policy will be downgraded to match the running system. If no policy can be found, sesearch will print an error message and exit. RULE TYPE OPTIONS
sesearch is capable of searching multiple types of rules. At least one of the following must be provided to specify the desired type(s) of rules to search. -A, --allow Search for allow rules. --neverallow Search for neverallow rules. --auditallow Search for auditallow rules. --dontaudit Search for dontaudit rules. -T, --type Search for type_transition, type_member, and type_change rules. --role_allow Search for role allow rules. --role_trans Search for role_transition rules. --range_trans Search for range_transition rules. --all Search all rule types. EXPRESSIONS
The user may specify an expression containing values for a given field(s) in a rule. Only those fields applicable to a given rule type will be used; all other fields will be ignored. (For example, type_transition rules will ignore the permissions field.) If no expression is specified or if none of the specified fields apply to a given rule type, all rules of that type are considered to match the expression. -s NAME, --source=NAME Find rules with type/attribute NAME as their source. -t NAME, --target=NAME Find rules with type/attribute NAME as their target. --role_source=NAME Find rules with role NAME as their source. --role_target=NAME Find rules with role NAME as their target. -c NAME, --class=NAME Find rules with class NAME as their object class. -p P1[,P2,...] --perm=P1[,P2...] Find rules with at least one of the specified permissions. Multiple permissions may be specified as a comma separated list; it is recommended that this list be quoted for shells that interpret comma as a special character. -b NAME, --bool=NAME Find conditional rules with NAME in their conditional expression. This option will include rules in both the true and false lists of the conditional. OPTIONS
The following additional options exist to modify how the search is performed and the amount of information printed for each result. -d, --direct Normally rules are matched using the type given or any of that type's attributes (or an attribute's types). This "indirect" match- ing also considers types used in complemented sets, the special set "*", and the special target "self". When the direct flag is given, matching is done literally. The rule must explicitly contain the given type (or attribute) for it to be returned. -R, --regex Use regular expressions to match symbol names. By default only exact string matches will be considered. -n, --linenum Print the line number for each rule. This option is ignored if using the --semantic option or if line numbers are not available for the given policy. -S, --semantic Search rules semantically instead of syntactically. This option is implied for policies for which syntactic rules are not available. -C, --show_cond Print the conditional expression and state for all conditional rules found. This option has no effect on unconditional rules. -h, --help Print help information and exit. -V, --version Print version information and exit. AUTHOR
This manual page was written by Jeremy A. Mowery <jmowery@tresys.com>. COPYRIGHT
Copyright(C) 2003-2008 Tresys Technology, LLC BUGS
Please report bugs via an email to setools-bugs@tresys.com. SEE ALSO
seinfo(1), apol(1) sesearch(1)
All times are GMT -4. The time now is 07:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy