02-19-2009
Hi kevin,
grep -vxf file1 file2
This will give the lines from file2 which are not in file1
Regards
Ranjith
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. UNIX for Advanced & Expert Users
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
Hi,
I am having a file like below
hello how are you
hello... (5 Replies)
Discussion started by: rohit_shinez
5 Replies
LEARN ABOUT DEBIAN
mimedefang.pl
MIMEDEFANG.PL(8) System Manager's Manual MIMEDEFANG.PL(8)
NAME
mimedefang.pl - Perl script to scan MIME messages.
SYNOPSIS
mimedefang.pl [-f filter] dir
DESCRIPTION
mimedefang.pl is a Perl script designed to work with mimedefang(8). It takes a single argument which is a directory which should contain
files laid out as described in mimedefang(8).
OPTIONS
-f filter
Specifies the name of the file containing the filter. If this option is omitted, the default filter /etc/mimedefang-filter is used.
OPERATION
mimedefang.pl evaluates the file /etc/mimedefang-filter as a Perl fragment. This file should define the filter procedure. For each part
of a MIME message, mimedefang.pl calls filter and disposes of the part as instructed by the filter. The various modes of disposition are
described in mimedefang-filter(5).
TESTING FILTERS
You are strongly recommended to test your filter before installing it in /etc/mimedefang-filter. To test the filter, save it in a file
(e.g. test-filter) and run this command:
mimedefang.pl -f test-filter -test
This tests the filter for syntactic correctness. If it passes, you can install it as a production filter. (Note that the test tests only
for correct Perl syntax; it doesn't make sure your filter does something sensible.)
MISCELLANEOUS OPTIONS
There are a few other ways to invoke mimedefang.pl:
mimedefang.pl -structure < mime_message
parses a message on stdin and prints lots of debugging information.
mimedefang.pl -prettyprint < mime_message
parses a message on stdin and prints it in a "nice" format (depending on your definition of "nice".)
mimedefang.pl -features
prints a list of detected optional Perl modules. The output looks something like this:
SpamAssassin: yes
mimedefang.pl -validate
calls the function filter_validate, if it is defined in your filter. filter_validate should return an integer; this becomes the exit code.
If filter_validate does not exist, an error message is printed and mimedefang.pl exits with an exit code of 1.
AUTHOR
mimedefang.pl was written by David F. Skoll <dfs@roaringpenguin.com>. The mimedefang home page is http://www.mimedefang.org/.
SEE ALSO
mimedefang(8), mimedefang-filter(5), mimedefang-protocol(7)
4th Berkeley Distribution 8 February 2005 MIMEDEFANG.PL(8)