Sponsored Content
Top Forums UNIX for Dummies Questions & Answers GREP Find & Replace <p class> Post 302677851 by cuddlykitty on Thursday 26th of July 2012 06:31:53 PM
Old 07-26-2012
Error message

It's giving me an error.

I'm using the BBEdit GREP -- I go to Search, Find, then it provides me two fields: Find, and then Replace.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find & Replace

I get a text file with 70+ columns (seperated by Tab) and about 10000 rows. The 58th Column is all numbers. But sometimes 58th columns has "/xxx=##" after the numeric data. I want to truncate this string using the script. Any Ideas...:confused: (3 Replies)
Discussion started by: gagansharma
3 Replies

2. Shell Programming and Scripting

find & incremental replace?

Looking for a way using sed/awk/perl to replace port numbers in a file with an incrementing number. The original file looks like... Host cmg-iqdrw3p4 LocalForward *:9043 localhost:9043 Host cmg-iqdro3p3a LocalForward *:10000 localhost:10000 Host cmg-iqdro3p3b LocalForward... (2 Replies)
Discussion started by: treadwm
2 Replies

3. Shell Programming and Scripting

find & replace with user input

Trying to create a script/executable to replace "abc" text string in "myfile.htm" with input from a pop-up field. For example, launch this thing and a prompt is popped up asking the user to input what "abc" should be replaced with, then it inserts what the user inputs in place of abc in the... (3 Replies)
Discussion started by: mike909
3 Replies

4. Shell Programming and Scripting

Find & Replace string in multiple files & folders using perl

find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g' this is simple logic to find and replace in multiple files & folders Hope this helps. Thanks Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies

5. Shell Programming and Scripting

Using grep and regular expression to find class references in a c++ file

I'm trying to math all class references in a C++ file using grep with regular expression. I'm trying to know if a specific include is usuless or not, so I have to know if there is a refence in cpp. I wrote this RE that searches for a reference from class ABCZ, but unfortunately it isn't working... (0 Replies)
Discussion started by: passerby
0 Replies

6. Shell Programming and Scripting

How to use grep & find command to find references to a particular file

Hi all , I'm new to unix I have a checked project , there exists a file called xxx.config . now my task is to find all the files in the checked out project which references to this xxx.config file. how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies

7. Shell Programming and Scripting

Using Grep & find & while read line in a script

Hello people! I would like to create one script following this stage I have one directory with 100 files File001 File002 ... File100 (This is the format of content of the 100 files) 2012/03/10 12:56:50:221875936 1292800448912 12345 0x00 0x04 0 then I have one... (0 Replies)
Discussion started by: Abv_mx81
0 Replies

8. Shell Programming and Scripting

Find & replace --> create a new file

Hi All, I have a unix shell script file as below. My task is a)to replace 248 to 350 and need to create a new file as BW3_350.sh b)to replace 248 to 380 and need to create a new file as BW3_380.sh c)to replace 248 to 320 and need to create a new file as BW3_320.sh there is no... (6 Replies)
Discussion started by: karthi_mrkg
6 Replies

9. UNIX for Dummies Questions & Answers

Find & Replace

Hi I am looking to rename the contents of this dir, each one with a new timestamp, interval of a second for each so it the existing format is on lhs and what I want is to rename each of these to what is on rhs..hopefully it nake sense CDR.20060505.150006.gb CDR.20121211.191500.gb... (3 Replies)
Discussion started by: rob171171
3 Replies

10. UNIX for Dummies Questions & Answers

Find & Replace with same case letters

I have text with upper and lower case words. I want to find something and replace it with something new. But it should match the case - Meaning - it should replace old upper cased word with NEW upper case word and lower with lower. example: this text is very simple TEXT. now I want to replace... (5 Replies)
Discussion started by: grep_me
5 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. -D, --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 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy