delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/08/25/08:27:28

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=Oa785au
wcebz/iNgVABntBQELt8RYsi5yjPcZpv0HnDUAaEjg/lC4TJxeEFxaB087MqyV3F
fjFjx5zd3eaQcU/os1G8DN33XE52i6D4g/cb/BvPsKJNIy8Dpr9nrBiDIX4wQMNT
DMIHtlwDpLgxT45aMYOst2aIQb2FlsXvFxOU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=X8PlOC9M9v69m
gIr2Yzw/BjBE2k=; b=Nxi38KbEJTnE8ww7K6mUaF+XCi/8TR4nwBVOd5nvjyQZz
NO+5ZF7FWJhNM/ijGuhiI+d7D1ut9+1bDnfoRiH4ShU+gwknXweLDqCZzEAK7AwK
Y3+J1B+DzBDwF9Rb4qKeSu/wRMYN0MUwg1fyF+0i+NNgS+vhagtAWsSMjf88Gk=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=pasting, dos2unix, million, rightclick
X-HELO: mail-it0-f48.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=X7wPe1ixMA811fBbTOmugzEsF6Sf9fviKHvw5oVCra8=; b=bW1WVCqcw1S7JcJCUQopMpg9rVT39EA0D6gu1Wb8IGnb87M+7487ltvqzuk4pV4dEd LEl2+/eXavFniik3I7KFk4V89WeAbN7qRihjdnFbUdMCktbXjNL5I4WV0b7F1ApGKFW3 ++Pnd/fHvWgEDCIOVyFsEnWDmQifHjEwj48sglMSCTrrcdQ3bi3h/KmfwqS4pt5D6qiU zie0E9EJOWOUHj/spc8YBggZaxhMdsrckh+rUgDw1BYcXFeB8AVvrwGnDCJZi5/NmY+E sH6N5QNEHkqQjeU0tW6d2GiWXTt/S1rUcZ8H40Tx1fH8sA0CIL7fzN74J5P7LFK7FnOp hv5A==
MIME-Version: 1.0
In-Reply-To: <8ea768ba-0fdb-710f-e41a-c9bc52057198@razorcat.de>
References: <CAD8GWstSbJHnP3XWKvhbtRisB=jJL7SJA9aMOWMJVDbMC_VdYA AT mail DOT gmail DOT com> <1e37af1d-21fa-9c56-b135-cb9a4375d902 AT gmail DOT com> <CAD8GWstSh96mfvMmHFwfu4JJySUm-0doZsF7HX6LKWGqnyddMg AT mail DOT gmail DOT com> <8ea768ba-0fdb-710f-e41a-c9bc52057198 AT razorcat DOT de>
From: Lee <ler762 AT gmail DOT com>
Date: Sat, 25 Aug 2018 08:27:13 -0400
Message-ID: <CAD8GWssUk8BAf=Fr+=Yev1KC3zJRSqR1k279wLmqPHqz1F4b7A@mail.gmail.com>
Subject: Re: speeding up a paste operation
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

On 8/25/18, Frank Redeker  wrote:
> Am 25.08.2018 um 02:10 schrieb Lee:
>> On 8/24/18, James Darnley wrote:
>>> On 2018-08-25 01:30, Lee wrote:
>>>> In retrospect, I should have created the file some other way, but
>>>> still..
>>>> - grab the top 1M hosts from from
>>>> http://s3-us-west-1.amazonaws.com/umbrella-static/index.html
>>>> - open w/ libreoffice
>>>> - select the host name column, right click & select copy (all 1 million
>>>> lines)
>>>> - (mintty 2.9.0 window already open) vi /tmp/hosts
>>>> - i  (get into insert mode)
>>>> - right click (which I have set to "paste")
>>>>
>>>> data is still scrolling by & it's not even up to 100K lines yet :(
>>>>
>>>> Is there some way to make a paste operation faster in mintty (or vim
>>>> or whatever the slowpoke is)?
>>>
>>> There's a utility called getclip which put the clipboard onto stdout.
>>> Direct that into a file and you should get the same result, excluding
>>> Vim's indentation.  Probably doesn't use the tty in anyway.
>>
>> Is getclip different from
>>   cat > /tmp/hosts
>>   <right-click to paste in the 1M lines>
>>
>> at least 'cat > /tmp/hosts' that goes faster than I can read.  But
>> while that's running I can open notepad, paste the 1M lines in there,
>> save to \cygwin\tmp\doshosts, open another mintty window & dos2unix
>> /tmp/doshosts -- all that before the <right-click paste> finishes :(
>>
>> Thanks,
>> Lee
>
>Hi Lee,
>
> what about 'cp /dev/clipbord /tmp/hosts'?

Much better!  That takes about the same time as pasting into notepad,
so I'm guessing that's about as fast as I can expect.

but I need to convert line endings:
$ file hosts.txt
hosts.txt: ASCII text, with CRLF line terminators

Thanks
Lee

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019