delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/09/19:12:50

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20091209234706.GC868@KCJs-Computer>
References: <7abf96460912091409i3937fbd1kc3c597a3e8a9e79a AT mail DOT gmail DOT com> <4B2025D0 DOT 8090301 AT bopp DOT net> <20091209234706 DOT GC868 AT KCJs-Computer>
Date: Thu, 10 Dec 2009 11:12:34 +1100
Message-ID: <7abf96460912091612h1852e1c0n2867864bbf737504@mail.gmail.com>
Subject: Re: How to print the full Windows path inside the sed command?
From: Chip Panarchy <forumanarchy AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

How do I put cygpath -ma in the command instead of 'PATH'?

Also, is there a way to add a trailer (currently just a header to each line)

Thanks,

Panarchy

On Thu, Dec 10, 2009 at 10:47 AM, Gary Johnson <garyjohn AT spocom DOT com> wrote:
> On 2009-12-09, Jeremy Bopp wrote:
>> Chip Panarchy wrote:
>
>> > Then I ran the following command from command-prompt;
>> >
>> > find2 . -follow -type f | sed -e "s|^\.|PATH|" -e "s|^|File:\t|"
>> >
>> > Is there a command (from Cygwin/Linux: PATH) which I can use to print
>> > the full directory path?
>> >
>> > Please tell me how I can make this command work.
>>
>> The default behavior of the find program is to print out paths including
>> the path to the directory you are searching. =A0In your case, you're usi=
ng
>> the current working directory (.), but you could give find the full path
>> instead. =A0You can run something like the following:
>>
>> find path/to/my/directory -follow -type f | sed -e "s|^|File:\t|"
>>
>> All file paths printed by this will have path/to/my/directory included
>> so there is no need to have sed try to replace (.) with some other path
>> string.
>
> In addition to all that, if you're trying to convert between Cygwin
> full path names and Windows full path names, use cygpath.
>
> Regards,
> Gary
>
>
>
> --
> Problem reports: =A0 =A0 =A0 http://cygwin.com/problems.html
> FAQ: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://cygwin.com/faq/
> Documentation: =A0 =A0 =A0 =A0 http://cygwin.com/docs.html
> Unsubscribe info: =A0 =A0 =A0http://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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019