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 To: "Nellis, Kenneth" , "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: References: <2BF01EB27B56CC478AD6E5A0A28931F2043AE34F AT A1DAL1SWPES19MB DOT ams DOT acs-inc DOT net> In-Reply-To: <2BF01EB27B56CC478AD6E5A0A28931F2043AE34F@A1DAL1SWPES19MB.ams.acs-inc.net> Content-Type: text/plain; charset="us-ascii" 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: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit 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