I have following file content (3 fields each line):
23 888 10.0.0.1
dfh 787 10.0.0.2
dssf dgfas 10.0.0.3
dsgas dg 10.0.0.4
df dasa 10.0.0.5
df dag 10.0.0.5
dfd dfdas 10.0.0.5
dfd dfd 10.0.0.6
daf nfd 10.0.0.6
...
as can be seen, that the third field is ip address and sorted. but... (3 Replies)
Hey all, a relative bash/script newbie trying solve a problem.
I've got a text file with lots of lines that I've been able to clean up and format with awk/sed/cut, but now I'd like to remove the lines with duplicate usernames based on time stamp. Here's what the data looks like
2007-11-03... (3 Replies)
Hi, I have a huge file which is about 50GB. There are many lines. The file format likes
21 rs885550 0 9887804 C C T C C C C C C C
21 rs210498 0 9928860 0 0 C C 0 0 0 0 0 0
21 rs303304 0 9941889 A A A A A A A A A A
22 rs303304 0 9941890 0 A A A A A A A A A
The question is that there are a few... (4 Replies)
The question is not as simple as the title... I have a file, it looks like this
<string name="string1">RZ-LED</string>
<string name="string2">2.0</string>
<string name="string2">Version 2.0</string>
<string name="string3">BP</string>
I would like to check for duplicate entries of... (11 Replies)
Hello Folks,
Can some one help me with the removal of duplicate lines from a log file and send it to another log file. It's bit complicated as two lines are same but only difference is the timestamp, but some lines are uniq. Line has been seperated by colon's.
Log file:... (5 Replies)
hi to all
Does anyone know if there's a way to remove duplicate lines which we consider the same only if they have the first and the second column the same?
For example I have :
us2333 bbb 5
us2333 bbb 3
us2333 bbb 2
and I want to get
us2333 bbb 10
The thing is I cannot... (2 Replies)
if I have the following lines in a file app.log
some lines here
<AAAA>
abc
<id>123456789</id>
ddd
</AAAA>some lines here too
<BBBB>
abc
<id>123456789</id>
ddd
</BBBB>some lines here too
<AAAA>
xyz
<id>987654321</id>
ssss
</AAAA>some lines here again...
How do I get the... (5 Replies)
Hi,
I have a csv file which contains some millions of lines in it.
The first line(Header) repeats at every 50000th line. I want to remove all the duplicate headers from the second occurance(should not remove the first line).
I don't want to use any pattern from the Header as I have some... (7 Replies)
Hi All,
I am storing the result in the variable result_text using the below code.
result_text=$(printf "$result_text\t\n$name") The result_text is having the below text. Which is having duplicate lines.
file and time for the interval 03:30 - 03:45
file and time for the interval 03:30 - 03:45 ... (4 Replies)
Discussion started by: nalu
4 Replies
LEARN ABOUT DEBIAN
io::async::protocol
IO::Async::Protocol(3pm) User Contributed Perl Documentation IO::Async::Protocol(3pm)NAME
"IO::Async::Protocol" - base class for transport-based protocols
DESCRIPTION
This subclass of IO::Async:Notifier provides storage for a IO::Async::Handle object, to act as a transport for some protocol. It contains
an instance of the transport object, which it adds as a child notifier, allowing a level of independence from the actual transport being
used. For example, a stream may actually be an IO::Async::SSLStream to allow the protocol to be used over SSL.
This class is not intended to be used directly, instead, see one of the subclasses
IO::Async::Protocol::Stream - base class for stream-based protocols
EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters:
on_closed
Optional. Invoked when the transport handle becomes closed.
PARAMETERS
The following named parameters may be passed to "new" or "configure":
transport => IO::Async::Handle
The "IO::Async::Handle" to delegate communications to.
on_closed => CODE
CODE reference for the "on_closed" event.
When a new "transport" object is given, it will be configured by calling the "setup_transport" method, then added as a child notifier. If a
different transport object was already configured, this will first be removed and deconfigured using the "teardown_transport".
METHODS
$transport = $protocol->transport
Returns the stored transport object
$protocol->connect( %args )
Sets up a connection to a peer, and configures the underlying "transport" for the Protocol.
Takes the following named arguments:
socktype => STRING or INT
Required. Identifies the socket type, and the type of continuation that will be used. If this value is "stream" or "SOCK_STREAM"
then "on_stream" continuation will be used; otherwise "on_socket" will be used.
on_connected => CODE
Optional. If supplied, will be invoked once the connection has been established.
$on_connected->( $protocol )
transport => IO::Async::Handle
Optional. If this is provided, it will immediately be configured as the transport (by calling "configure"), and the "on_connected"
callback will be invoked. This is provided as a convenient shortcut.
Other arguments will be passed to the underlying "IO::Async::Loop" "connect" call.
TRANSPORT DELEGATION
The following methods are delegated to the transport object
close
SUBCLASS METHODS
"IO::Async::Protocol" is a base class provided so that specific subclasses of it provide more specific behaviour. The base class provides a
number of methods that subclasses may wish to override.
If a subclass implements any of these, be sure to invoke the superclass method at some point within the code.
$protocol->setup_transport( $transport )
Called by "configure" when a new "transport" object is given, this method should perform whatever setup is required to wire the new
transport object into the protocol object; typically by setting up event handlers.
$protocol->teardown_transport( $transport )
The reverse of "setup_transport"; called by "configure" when a previously set-up transport object is about to be replaced.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.14.2 2012-10-24 IO::Async::Protocol(3pm)