Hi everyone,
I have a file in which a word is repeated more than one time and I want to know how many times it is repeated.
ex: if i repeated word 'guru' in 10 lines I can get the o/p as:
cat filename | grep -c 'guru'.
How ever if the word is repeated more than one time, then how can I... (4 Replies)
Hi,
I need to find out the repeated IP address from the apache log file from my box. I did try to come out with the script, but I could not grep out the repeated Ip Address from the error_logs and need to redirect to a file. Can you guys please help me out of this problem.
Thanks in... (9 Replies)
Hi,
I am using a mail application, When I use to check with the command, I will get the outputs as
q -s
6128175 (9, 9/6128175)
Return-path: minka.bell@abcd.org
From: "Minka Bell" <minka.bell@abcd.org>
To: <dcrouch@xyz.org>,
Subject: Open items with new PICT system
Date: Wed,... (12 Replies)
This is probably a real n00b question but i`m not able to figure it out.
I have a folder of configuration files that contain IP-adresses. The line i`m interested in looks like this:
IP_ADDRESS="123.123.123.1123"
Some have muliple ip adresses, so the line will look like :
... (5 Replies)
I have a text file where I need to find the string = ST*850*
This string is repetaed several times in the file, so I need to know how many times it appears in the file, this is the text files:
ISA*00* *00* *08*925485USNR *ZZ*IMSALADDERSP... (13 Replies)
Hi All,
I have a file which is "|" pipe delimited. The file has 3 fields. the last field contains email ids which has different host names.
I want to sort the file based on host name, which is in 3rd filed and needs to create a file for each host.
For example, if out of 1000 records, 10... (6 Replies)
Hi All,
I have some data like below.
Step1,Param1,Param2,Param3
1,2,3,4
2,3,4,5
2,4,5,6
3,0,1,2
3,0,0,0
3,2,1,3
........
so on
Where I need to find the median(arithmetic) of each column from Param1...to..Param3 for each set of Step1 values.
(Sort each specific column, if the... (5 Replies)
Hi All,
I need the modification for the below mentioned code (found in one more post https://www.unix.com/shell-programming-scripting/27161-script-generate-average-values.html) to find the average values for all the columns(but for a specific rows) and print the averages side by side.
I have... (4 Replies)
Hi below is the input file, i need to find repeated words and sum up the values of it which is second field from the repeated work.Im trying but getting no where close to it.Kindly give me a hint on how to go about it
Input
fruits,apple,20,fruits,mango,20,veg,carrot,12,veg,raddish,30... (11 Replies)
Have three files. Any other approach with regards to file concatenation or splitting, etc is appreciated
If column55(billngtype) of file1 contains YMNC or YPBC then pick the value of column13(documentnumber). Now find this documentnumber in column1(Billdoc) of file2 and grep the corresponding... (4 Replies)
Discussion started by: as7951
4 Replies
LEARN ABOUT FREEBSD
trpt
TRPT(8) BSD System Manager's Manual TRPT(8)NAME
trpt -- transliterate protocol trace
SYNOPSIS
trpt [-a] [-f] [-j] [-p hex-address] [-s] [-t] [system [core]]
DESCRIPTION
The trpt utility interrogates the buffer of TCP trace records created when a socket is marked for ``debugging'' (see setsockopt(2)), and
prints a readable description of these records. When no options are supplied, trpt prints all the trace records found in the system grouped
according to TCP connection protocol control block (PCB).
The following options may be used to alter this behavior:
-a In addition to the normal output, print the values of the source and destination addresses for each packet recorded.
-f Follow the trace as it occurs, waiting a short time for additional records each time the end of the log is reached.
-j Just give a list of the protocol control block addresses for which there are trace records.
-p Show only trace records associated with the protocol control block at the given address hex-address.
-s In addition to the normal output, print a detailed description of the packet sequencing information.
-t In addition to the normal output, print the values for all timers at each point in the trace.
The recommended use of trpt is as follows. Isolate the problem and enable debugging on the socket(s) involved in the connection. Find the
address of the protocol control blocks associated with the sockets using the -A option to netstat(1). Then run trpt with the -p option, sup-
plying the associated protocol control block addresses. The -f option can be used to follow the trace log once the trace is located. If
there are many sockets using the debugging option, the -j option may be useful in checking to see if any trace records are present for the
socket in question.
If debugging is being performed on a system or core file other than the default, the last two arguments may be used to supplant the defaults.
FILES
/boot/kernel/kernel
/dev/kmem
DIAGNOSTICS
no namelist When the system image does not contain the proper symbols to find the trace buffer; others which should be self explanatory.
SEE ALSO netstat(1), setsockopt(2)HISTORY
The trpt utility appeared in 4.2BSD.
BUGS
Should also print the data for each input or output, but this is not saved in the trace record.
The output format is inscrutable and should be described here.
BSD December 11, 1993 BSD