delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/06/29/14:19:47

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
To: cygwin AT sourceware DOT cygnus DOT com
Subject: d:/foo to //d/foo to d:\foo to d:/foo
From: dkarr AT tcsi DOT com (David M. Karr)
Date: 29 Jun 2000 11:15:44 -0700
Message-ID: <uy66qsl5f3.fsf@tcsi.com>
Lines: 24
X-Mailer: Gnus v5.5/Emacs 20.6

I know this is a FAQ, but I'm having trouble combining everything I've
read about this into a concise statement.

I have a bash script that references the HOME variable, which in DOS
is set to "d:/dmk".  In the script, I want to pass something like
"$HOME/subdir" to a non-cygwin program.

It appears that I have to emit the following each time I want
something like this:

echo $(cygpath -w $HOME | sed -e 's,\\,/,g')

If I just use "$(cygpath -w $HOME)", it produces "d:\dmk", which bash
processes and removes the "\".

Is there an easier way to do this, or do I just have to write the
script "dospathinbash" (which would do the filter described here) for
whenever I need to do this (which is quite often)?  A shell function
would probably better than a script.

-- 
===============================================================================
David M. Karr     ; dkarr AT tcsi DOT com  ; w:(425)487-8312 ; TCSI & Best Consulting
Software Engineer ; Unix/Java/C++/X ; BrainBench CJ12P (6/12/2000)


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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