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:mime-version:in-reply-to:references:date | |
:message-id:subject:from:to:content-type; q=dns; s=default; b=uK | |
mOj4QIT0c6laZfDkPUVgWLNfdXbS3DE8FfCEN28VVDWj8L7itdJOdHuS44UcuXEd | |
6WrV8dAspJUV4WcSl1l08fdFb1QjpCcVPuPI8fuEc+EVu/+IcGHzcbBmfpy0t5Wm | |
iSMsYgzaq2ALBCQDNCrJ8joh5y8/w3rgCEHB1KSHM= | |
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:date | |
:message-id:subject:from:to:content-type; s=default; bh=FG1KZInf | |
NWjitZxV3SqSIz0O+cA=; b=KBGluLOFC6LhgnQo9adKvOToCgG5/U7WvphFD90H | |
Tj6TkglhNQ678ziyLFkXtUW1w4ewzXCJjyovLvEKy7lxNKCl25aEksvqu4pWb9FV | |
6wkzGh03nDM6jJjh/w6bAlXB5f9eXPYXhKRf6gEbIfte+aOiKbnPTKyTiKz8fSz9 | |
fX4= | |
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=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 |
X-HELO: | mail-ie0-f177.google.com |
MIME-Version: | 1.0 |
X-Received: | by 10.42.188.70 with SMTP id cz6mr212487icb.19.1412204211317; Wed, 01 Oct 2014 15:56:51 -0700 (PDT) |
In-Reply-To: | <CAFWoy7EuG5vr2=QvEL5Js5Zg8rNfmLbHUYOrmnEdZsJ2vGFSnQ@mail.gmail.com> |
References: | <loom DOT 20141001T235147-60 AT post DOT gmane DOT org> <542C854D DOT 3050001 AT jhmg DOT net> <CAFWoy7EuG5vr2=QvEL5Js5Zg8rNfmLbHUYOrmnEdZsJ2vGFSnQ AT mail DOT gmail DOT com> |
Date: | Wed, 1 Oct 2014 16:56:51 -0600 |
Message-ID: | <CAFWoy7FUF+Pe+nOFy+zT-5YVP-DaVWbuHYQnamYfx7OdxsKNFA@mail.gmail.com> |
Subject: | Re: Direct/efficient way to chop off trailing \n |
From: | Keith Christian <keith1christian AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Looks like the cygpath line was broken in two, and the closing brace isn't visibile when reading in Gmail. Readers take note of that. On Wed, Oct 1, 2014 at 4:54 PM, Keith Christian <keith1christian AT gmail DOT com> wrote: > This function echoes the present directory to the clipboard, so that I > don't have to enter the path manually. > > I use this function in a script that sources when a bash shell is > started. Also echoes the path to the terminal for verification. > Handy for pasting directly into windows file dialogs. > > function xx() { > DESCRIPTION="Copy the Windows drive/path/filename to the clipboard" > cygpath -w "`pwd`"|tr -d "\012"|sed -e > 's/$/\\/'|putclip;echo;getclip;echo > } > > On Wed, Oct 1, 2014 at 4:50 PM, Jim Garrison <jhg AT jhmg DOT net> wrote: >> On 10/1/2014 2:52 PM, Paul.Domaskis wrote: >>> Running bash in a Windows environment, I often find the need to >>> generate a full Windows path to a file so that I can access the file >>> from a Windows app. >> [snip] >>>... but it does remove the trailing \n which chokes up >>> Windows. >> >> Sounds like cygpath needs a "-n" option which eliminates the >> trailing newline. >> >> >> -- >> Jim Garrison (jhg AT acm DOT org) >> PGP Keys at http://www.jhmg.net RSA 0x04B73B7F DH 0x70738D88 >> >> -- >> 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 >> -- 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 |