Grep script to filter


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Grep script to filter
Prev   Next
# 1  
Old 02-18-2009
Grep script to filter

Hi,

Wondering if anyone could help me with a simple script to filter out multiple things from a file.

Right now I just have long lines of grep -v remove file | greg -v etc etc

What I would like to do is have grep -v <run everything in a file> tofilter

If that makes sense. Basically a file with about 15-20 lines with things I would like to filter out from the file im running grep on.

Thanks
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Filter pattern in grep command

Hi, I am having a file like below hello how are you hello... (5 Replies)
Discussion started by: rohit_shinez
5 Replies

2. Shell Programming and Scripting

Grep regex filter

Hi, How can I run the grep search in a script to only include compute, not bigcomputer in following search input? " properties = local compute" " properties = local bigcompute" Thank you. -j (6 Replies)
Discussion started by: hce
6 Replies

3. Shell Programming and Scripting

Filter non-alpha character with grep/regexp

Hi all, I am trying to filter out those lines that contain a "non-alpha" character. An example of my input is the following: zygnematales grb zygocactus grb zygocactus_truncatus plt zygodactyl_foot prt zygoma prt zygomatic prt zygomatic_arch prt zygomatic_bone ... (2 Replies)
Discussion started by: owwow14
2 Replies

4. Shell Programming and Scripting

How set filter netstat -an | grep -P '\:'38''

Hi, I can write sh script for Linux platform I run: netstat -an | grep -P '\:'38''| grep ESTABLISHED but result: # netstat -an | grep -P '\:'38''| grep ESTABLISHED tcp 0 0 172.16.1.107:383 172.16.1.81:49981 ESTABLISHED tcp 0 0... (8 Replies)
Discussion started by: ostapv
8 Replies

5. Shell Programming and Scripting

How to filter only the last 'n' lines of a grep output?

I am running a grep query for searching a pattern, and the output is quite huge. I want only the last 200 lines to be displayed, and I am not sure if tail will do the trick (can tail read from std in/out instead of files?). Please help me out. (1 Reply)
Discussion started by: shell_newbie
1 Replies

6. Shell Programming and Scripting

Need to build a grep/sed/awk filter

Hi I need to to direct only the path and the name of the trace file to a new file. How do I use grep/awk/sed filter? eg. ABC.root>cat alert_omc_dg.log | grep trc ORA-00060: Deadlock detected. More info in file /u01/oradata/omc/udump/omc_dg_ora_3555.trc. ORA-00060: Deadlock detected. More... (8 Replies)
Discussion started by: geetap
8 Replies

7. Shell Programming and Scripting

Filter on a grep

I am attempting to figure out how to only capture part of a grep command I am doing. So far no luck. When I execute.... leviathan:/gfs/home/tivoli>ps -ef | /usr/ucb/ps -auxww | grep nco_p_syslog The results are.... tivoli 10185 0.0 0.0 5888 5168 ? S Oct 23 0:26... (2 Replies)
Discussion started by: LRoberts
2 Replies

8. Shell Programming and Scripting

filter grep command

I have ran into a small issue and I am not sure how to fix it. In one of our current scripts we have this line which does a grep to get the pid of the process. ps -ef | grep nco_p_syslog | grep $x | awk '{print $2}' However this is not returning anything due to the how long the value... (7 Replies)
Discussion started by: LRoberts
7 Replies

9. UNIX for Advanced & Expert Users

ps avg | grep ? filter the desired out put.

Hi Folk, Following is the command I used to get data related to the DataFlowEngine. I wanted to know the % usage of cpu and memory. ps avg | grep Data This command will show the processes with its PID as : PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND ... (1 Reply)
Discussion started by: varungupta
1 Replies

10. UNIX for Dummies Questions & Answers

Filter results through pipe with grep

ls -ltr | grep string How can I use regular expressions to filter the results provided even more. I am using the above command as a reference. (1 Reply)
Discussion started by: ckandreou
1 Replies
Login or Register to Ask a Question
decrypt(3pm)						User Contributed Perl Documentation					      decrypt(3pm)

NAME
Filter::decrypt - template for a decrypt source filter SYNOPSIS
use Filter::decrypt ; DESCRIPTION
This is a sample decrypting source filter. Although this is a fully functional source filter and it does implement a very simple decrypt algorithm, it is not intended to be used as it is supplied. Consider it to be a template which you can combine with a proper decryption algorithm to develop your own decryption filter. WARNING
It is important to note that a decryption filter can never provide complete security against attack. At some point the parser within Perl needs to be able to scan the original decrypted source. That means that at some stage fragments of the source will exist in a memory buffer. Also, with the introduction of the Perl Compiler backend modules, and the B::Deparse module in particular, using a Source Filter to hide source code is becoming an increasingly futile exercise. The best you can hope to achieve by decrypting your Perl source using a source filter is to make it unavailable to the casual user. Given that proviso, there are a number of things you can do to make life more difficult for the prospective cracker. 1. Strip the Perl binary to remove all symbols. 2. Build the decrypt extension using static linking. If the extension is provided as a dynamic module, there is nothing to stop someone from linking it at run time with a modified Perl binary. 3. Do not build Perl with "-DDEBUGGING". If you do then your source can be retrieved with the "-Dp" command line option. The sample filter contains logic to detect the "DEBUGGING" option. 4. Do not build Perl with C debugging support enabled. 5. Do not implement the decryption filter as a sub-process (like the cpp source filter). It is possible to peek into the pipe that connects to the sub-process. 6. Check that the Perl Compiler isn't being used. There is code in the BOOT: section of decrypt.xs that shows how to detect the presence of the Compiler. Make sure you include it in your module. Assuming you haven't taken any steps to spot when the compiler is in use and you have an encrypted Perl script called "myscript.pl", you can get access the source code inside it using the perl Compiler backend, like this perl -MO=Deparse myscript.pl Note that even if you have included the BOOT: test, it is still possible to use the Deparse module to get the source code for individual subroutines. 7. Do not use the decrypt filter as-is. The algorithm used in this filter has been purposefully left simple. If you feel that the source filtering mechanism is not secure enough you could try using the unexec/undump method. See the Perl FAQ for further details. EXAMPLES
See /usr/share/doc/libfilter-perl/examples/decrypt/ for examples of encryption and decryption scripts using this filter. AUTHOR
Paul Marquess DATE
19th December 1995 perl v5.14.2 2012-06-22 decrypt(3pm)