delorie.com/archives/browse.cgi | search |
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:message-id:date:from:reply-to:mime-version:to | |
:subject:references:in-reply-to:content-type | |
:content-transfer-encoding; q=dns; s=default; b=Qq4xRT+j+kYIDbAb | |
94fO0RPACxwzIIlj2mCin6N4NkAcwRIDw6pZFyy1ml9v0GWdmmqTu3lqnX7vkz79 | |
WnCvt6oHn66jU5HOo2ErO4BVg4+vyT43qre/Fx/bf12ChDfjWJIpy2l5EWODCc51 | |
mxcSvOsrjXT/pfZfpwX1DRrdYJc= | |
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:message-id:date:from:reply-to:mime-version:to | |
:subject:references:in-reply-to:content-type | |
:content-transfer-encoding; s=default; bh=vUTIddbKFFr/ZloDmDk8wy | |
aN6II=; b=QNi4W3LZeyKWCR6ZIqY/21OWo4bzT4qhxg0a/32RNeGvzp1ARse3TU | |
getzsMxnV+g2I5d0fhlIngG8SdknwmM9G3HP4PHAZUohLzxf7P68wNGtw/BNj2I7 | |
g/hsItQRrEYzYxQCKbpMpzcDvC8IeWUGCt3TEDxXa/mcGYrmbkfI0= | |
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-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 |
X-HELO: | csmail.cs.umass.edu |
Message-ID: | <542CB798.8000800@cs.umass.edu> |
Date: | Wed, 01 Oct 2014 22:25:28 -0400 |
From: | Eliot Moss <moss AT cs DOT umass DOT edu> |
Reply-To: | moss AT cs DOT umass DOT edu |
User-Agent: | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Direct/efficient way to chop off trailing \n |
References: | <loom DOT 20141001T235147-60 AT post DOT gmane DOT org> <loom DOT 20141002T011040-272 AT post DOT gmane DOT org> <1576090815 DOT 20141002032152 AT yandex DOT ru> |
In-Reply-To: | <1576090815.20141002032152@yandex.ru> |
X-IsSubscribed: | yes |
You could write my solution as: echo -n `cygpath -aw foo`>/dev/clipboard though the ` (backtick) notation is deprecated these days and $(...) is described as preferred. But for many little things like these I write bash functions (or aliases, when they work, which they don't here). The echo solution has the good property that echo is a shell built-in and so does not require spawning another process. You had complained about speed, so even though the echo approach does not seem to top you list for elegance, it might for performance :-) ... Best -- Eliot -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |