9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Input file
SFSQW 5192.56
HNRNPK 611.486
QEQW 1202.15
ASDR 568.627
QWET 6382.11
SFSQW 4386.3
HNRNPK 100
SFSQW 500
Desired output file
SFSQW 10078.86 3
QWET 6382.11 1
QEQW 1202.15 1
HNRNPK 711.49 2
ASDR 568.63 1
The way I tried: (2 Replies)
Discussion started by: patrick87
2 Replies
2. Shell Programming and Scripting
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies
3. Shell Programming and Scripting
Hi All
Can anyone please suggest me how to remove the last byte from a falt file .This is from the last line's last BYTE.
Please suggest me something.
Thank's and regards
Vinay (1 Reply)
Discussion started by: vinayrao
1 Replies
4. Shell Programming and Scripting
In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server.
For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match.
Please... (4 Replies)
Discussion started by: krishmaths
4 Replies
5. Programming
Hi all,
Can anyone advise on how to display the data in a byte variable, i.e can i use printf("%s", vairable_name);?
Cheers (2 Replies)
Discussion started by: dwgi32
2 Replies
6. Shell Programming and Scripting
Please help me in removing the 2nd file :
-rw-rw-rw- 1 fup03a fup03a 9216 Aug 16 00:45 med_delay_log
-rw-rw-rw- 1 fup03a fup03a 0 Aug 16 18:04 (5 Replies)
Discussion started by: miltonkeynesguy
5 Replies
7. UNIX for Dummies Questions & Answers
Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Discussion started by: MrAd
5 Replies
8. Programming
Hi,
Can someone explain what is byte padding?
For ex:
struct emp{
char s;
int b;
char s1;
int b1;
long b3;
char s3;
}
What will be the size of this structure?
Thanks (6 Replies)
Discussion started by: naan
6 Replies
9. Shell Programming and Scripting
My program would be creating a file, incase of non data from database it would only able to produce 'END, logically it would be file created by oracle in unix.
this file is showing zero byte but actully there are 4 char in file.This is not required, therefore what is command line should be... (0 Replies)
Discussion started by: u263066
0 Replies
dpa(1) General Commands Manual dpa(1)
NAME
dpa - DNS Packet Analyzer. Analyze DNS packets in ip trace files
SYNOPSIS
dpa [ OPTION ] TRACEFILE
DESCRIPTION
dpa is used to analyze dns packets in trace files. It has 3 main options: count, filter, and count uniques (i.e. count all different
occurences).
OPTIONS
-c expressionlist
Count occurrences of matching expressions
-f expression
Filter: only process packets that match the expression
-h Show usage
-p Show the total number of correct DNS packets, and percentage of -u and -c values (of the total of matching on the -f filter. if no
filter is given, percentages are on all correct dns packets)
-of file
Write all packets that match the -f flag to file, as pcap data.
-ofh file
Write all packets that match the -f flag to file, in hexadecimal format, readable by drill.
-s Show possible match names
-s matchname
show possible match operators and values for name
-sf Only evaluate packets (in representation format) that match the -f filter. If no -f was given, evaluate all correct dns packets.
-u matchnamelist
Count every occurence of every value of the matchname (for instance, count all packetsizes, see EXAMPLES in ldns-dpa(1) ).
-ua For every matchname in -u, show the average value of all matches. Behaviour for match types that do not have an integer value is
undefined.
-uac For every matchname in -u, show the average number of times this value was encountered.
-um number
Only show the results from -u for values that occurred more than <number> times.
-v level
Set verbosity to level (1-5, 5 being the highest). Mostly used for debugging.
-notip file
Write packets that were not recognized as IP packets to file (as pcap data).
-baddns file
Write dns packets that were too mangled to parse to file (as pcap data).
-version
Show version and exit
LIST AND MATCHES
A <matchnamelist> is a comma separated list of match names (use -s to see possible match names). A <expressionlist> is a comma separated
list of expressions.
An expression has the following form: <expr>: (<expr>)
<expr> | <expr>
<expr> & <expr>
<match>
<match>: <matchname> <operator> <value>
<operator>: = equal to <value> != not equal to <value> > greater than <value> < lesser than <value>
>= greater than or equal to <value> <= lesser than or equal to <value> ~= contains <value>
See the -s option for possible matchnames, operators and values.
EXAMPLES
ldns-dpa -u packetsize -p test.tr
Count all different packetsizes in test.tr and show the precentages.
ldns-dpa -f "edns=1&qr=0" -of edns.tr test.tr
Filter out all edns enable queries in test.tr and put them in edns.tr
ldns-dpa -f edns=1 -c tc=1 -u rcode test.tr
For all edns packets, count the number of truncated packets and all their rcodes in test.tr.
ldns-dpa -c tc=1,qr=0,qr=1,opcode=QUERY test.tr
For all packets, count the number of truncated packets, the number of packets with qr=0, the number of packets with qr=1 and the
number of queries in test.tr.
ldns-dpa -u packetsize -ua test.tr
Show all packet sizes and the average packet size per packet.
ldns-dpa -u srcaddress -uac test.tr
Show all packet source addresses and the average number of packets sent from this address.
sudo tcpdump -i eth0 -s 0 -U -w - port 53 | ldns-dpa -f qr=0 -sf
Print all query packets seen on the specified interface.
AUTHOR
Written by Jelte Jansen for NLnetLabs.
REPORTING BUGS
Report bugs to <jelte@nlnetlabs.nl>.
COPYRIGHT
Copyright (C) 2005 NLnet Labs. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR-
POSE.
1 Nov 2005 dpa(1)