X-Recipient: archive-cygwin@delorie.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.Mueller@microsoft.com; helo=TK5EX14HUBC107.redmond.corp.microsoft.com ;icrosoft.com ;
From: Stephan Mueller <Stephan.Mueller@microsoft.com>
To: "Nellis, Kenneth" <Kenneth.Nellis@acs-inc.com>,
        "cygwin@cygwin.com"	<cygwin@cygwin.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@A1DAL1SWPES19MB.ams.acs-inc.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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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


