I have to compare records in two files. It can be done using gawk/awk but i am unable to do it. Please help me
File1
ABAAAAAB BC asa sa
ABAAABAA BC bsa sm
ABBBBAAA BC bxz sa
ABAAABAB BC csa sa
ABAAAAAA BC dsa sm
ABBBBAAB BC dxz sa
File 2
ABAAAAAB BC aas ba
ABAAAAAB BC asa sa... (6 Replies)
Guess the subject lines says it all.
What is the perl equivalent to grep -c
-c, --count
Suppress normal output; instead print a count of match-
ing lines for each input file. With the -v, --invert-
match option (see below), count non-matching lines.
... (6 Replies)
Hi,
I am using the script to print the portion of the file containing a particular string. But it is giving error "For Reading (No such file or directory). I am using cygwin as unix simulator.
cat TT35*.log | gawk -v search="12345678" '
/mSOriginating /,/disconnectingParty/ {
... (1 Reply)
Hi folks
I am not allowed to install GNU grep on AIX.
Here my code excerpt:
grep_fatal () {
/usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP"
}
Howto the same on AIX based machine?
from manual GNU grep
‘--after-context=num’
Print num lines of trailing context after... (4 Replies)
Hi,
I'm working with gawk (on DOS) today.
A goal is: find a string for-instance '123', cut a line in two columns and write second one. The problem is: command line works OK, awk file doesn't. But I would like to work with file because there are many strings to find.
input:
line command:
awk... (4 Replies)
I'm looking for SED equivalent for grep -w -f. All I want is to search a list of patterns from a file. Also If the pattern doesn't match I do not want "null returned", rather I would prefer some text as place holder say "BLANK LINE" as I intend to process the output file based on line number.
... (1 Reply)
I have to do grep -v in a perl script. I want to exclude blank lines and lines having visitor.
#grep -v visitor abc.txt |grep '.'
file:abc.txt
1340 not booked 16D:D9 tourist 8
1341 not booked 16C:D4 tourist 25
1342 not booked 16D:C4 visitor 7
1343 not booked 01C:D9 visitor 6
1344... (4 Replies)
I am trying to use gawk to search a file and put the second value of the string into a string.
gawk -F: '$1~/CXFR/ {print $2}' go.dat
Below is the file 'go.dat'
====================
HOME :/
CTMP :/tmp
CUTL :/u/rdiiulio/bin
CWRK :/u/work
CXFR :/u/xfer
... (1 Reply)
Need grep -v "Hello" equivalent for AIX (9 Replies)
Discussion started by: mohtashims
9 Replies
LEARN ABOUT DEBIAN
snmptrapfmt
SNMPTRAPFMT(8) System Manager's Manual SNMPTRAPFMT(8)NAME
snmptrapfmt - Receive and log SNMP trap messages from a trap handler.
SYNOPSIS
snmptrapfmt [-d num] [-D] [-f cfgfile]
DESCRIPTION
Snmptrapfmt receives SNMP trap data through a local pipe. The trap data is written to this pipe by a SNMP trap handler which is called by
snmptrapd (configuration is done in /etc/snmp/snmptrapd.conf) during the installation if this package. Snmptrapfmt formats the received
trap data according to the specifications in the configuration file /etc/snmp/snmptrapfmt.conf (see this file for the syntax). The output
of the snmptrapfmt application may be written to a log file or forwarded to the syslog daemon.
The option -d 1 should be specified to enable tracing. Trace information is then written to the file /var/tmp/snmptrapfmt.trc.
If the option -f cfgfile is given, the output of the daemon is configured via the mentioned configuration file. If this option is not spec-
ified, a default output format is used.
If the option -D is given, the the program will daemonize into the background.
The syntax of the configuration file is explained in /etc/snmp/snmptrapfmt.conf !
FILES
/etc/init.d/snmptrapfmt is the start/stop script.
/etc/snmp/snmptrapfmt.conf is the configuration file.
/var/run/snmptrapfmt.pid is the PID file.
/etc/snmp/snmptrapd.conf is the configuration file of the snmptrapd daemon, which calls the trap handler snmptrapfmthdlr.
/usr/sbin/snmptrapfmt is the executable of the application.
/usr/sbin/snmptrapfmthdlr is the executable of the trap handler.
/var/run/snmptrapfmt.p is the communication pipe between the trap handler snmptrapfmthdlr and the formatter snmptrapfmt.
/var/tmp/snmptrapfmt.trc is the trace file if the option -d is specified.
/var/log/snmptrapfmt.log is the log file as specified in the configuration file.
SEE ALSO snmptrapfmthdlr(8), syslog(8), variables(5), RFC 1155, RFC 1156, RFC 1157, SNMP Security Internet Drafts
4th Berkeley Distribution 19 DECEMBER 2002 SNMPTRAPFMT(8)