delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/13/11:28:10

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_20,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD,UNRESOLVED_TEMPLATE
X-Spam-Check-By: sourceware.org
X-SpamScore: -4
X-BigFish: VS-4(zz9371I98dKzz1202hzzz2fh2a8h683h839h944hd25h)
X-Forefront-Antispam-Report: CIP:131.107.125.8;KIP:(null);UIP:(null);IPV:NLI;H:TK5EX14HUBC107.redmond.corp.microsoft.com;RD:none;EFVD:NLI
Received-SPF: pass (mail77-tx2: domain of microsoft.com designates 131.107.125.8 as permitted sender) client-ip=131.107.125.8; envelope-from=Stephan DOT Mueller AT microsoft DOT com; helo=TK5EX14HUBC107.redmond.corp.microsoft.com ;icrosoft.com ;
From: Stephan Mueller <Stephan DOT Mueller AT microsoft DOT com>
To: "Nellis, Kenneth" <Kenneth DOT Nellis AT acs-inc DOT com>,
"cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: >> /dev/clipboard
Date: Fri, 13 Apr 2012 15:25:37 +0000
Deferred-Delivery: Fri, 13 Apr 2012 15:25:00 +0000
Message-ID: <A5150FFE07230F4BA8C5D16B253CA7320974FF@BL2PRD0310MB361.namprd03.prod.outlook.com>
References: <2BF01EB27B56CC478AD6E5A0A28931F2043AE34F AT A1DAL1SWPES19MB DOT ams DOT acs-inc DOT net>
In-Reply-To: <2BF01EB27B56CC478AD6E5A0A28931F2043AE34F@A1DAL1SWPES19MB.ams.acs-inc.net>
MIME-Version: 1.0
X-OrganizationHeadersPreserved: BL2PRD0310HT003.namprd03.prod.outlook.com
X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn%
X-FOPE-CONNECTOR: Id%59$Dn%ACS-INC.COM$RO%2$TLS%6$FQDN%131.107.125.5$TlsDn%
X-FOPE-CONNECTOR: Id%59$Dn%CYGWIN.COM$RO%2$TLS%6$FQDN%131.107.125.5$TlsDn%
X-CrossPremisesHeadersPromoted: TK5EX14HUBC107.redmond.corp.microsoft.com
X-CrossPremisesHeadersFiltered: TK5EX14HUBC107.redmond.corp.microsoft.com
X-OriginatorOrg: microsoft.com
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q3DFS50t024507

On Friday, April 13, 2012 7:25 AM, Kenneth Nellis wrote:

" Regarding the following...
"
" $ echo abc > /dev/clipboard
" $ echo def >> /dev/clipboard
" $ cat /dev/clipboard
" def
" $
"
"...just curious if the ">>" operator could/should work
" as with a regular file.

The Windows clipboard API isn't "file I/O style", and there's no
function in it to augment existing clipboard content, so it's
perhaps not surprising that it doesn't.

In theory, the code that provide /dev/clipboard could emulate
appending by reading the current content, then writing a full
replacement consisting of the current content plus whatever echo
wrote (in your example), if that code can know whether the file
handle was opened for append.  But even if so, you can imagine
it becoming quite inefficient (recopying early data many times)
if someone wrote many short snippets in succession (e.g. many
echo statements like your second one).

stephan($0.02);




--
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