delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/10/08:22:39

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <20001010122157.4618.qmail@web122.yahoomail.com>
Date: Tue, 10 Oct 2000 05:21:57 -0700 (PDT)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Subject: Re: BUG: Invalid assumption about file paths beginning with '\'
To: dave DOT banham AT tde DOT alstom DOT com
Cc: cygwin AT sourceware DOT cygnus DOT com
MIME-Version: 1.0

--- dave DOT banham AT tde DOT alstom DOT com wrote:
> 
> 
> Earnie,
> I would have thought that the whole point of the CygWin project was to
> provide
> UNIX tools on the PC Windows platform so that they feel like Windows tools
> and
> not like UNIX tools. In this respect the file system should work as expected
> for
> the platform on which the tool is used. The fact that CygWin is translating
> between the Windows file system and a UNIX/POSIX file system (to make the
> porting of UNIX tools to windows easier) is irrelevant since it is an
> internal
> (and abstracted) detail.
> 

Well, as Chris corrected, the current 1.1.4 release does allow the \ reference
to refer to the root of the current device.  I just tested this and it does
indeed work this way.

> An Example:
> If my working drive is m: and the current working folder is \projects (say)
> then
> when I execute:
> gwak -f \myscripts\script.awk in-file.txt
> I would expect gawk to read script.awk from m:\myscripts and in-file.txt from
> m:\projects. However, this results in a file not found for scripts.awk. If
> the
> command is modified to include the drive letter:
> gwak -f m:\myscripts\script.awk in-file.txt
> Then it works, which shows that CygWin correctly interpreted in-file.txt as
> being in the current working directory on the current drive.
> 
> As I said in my original posting, I cannot explicitly state the drive letter
> on
> the command line as it is all part of a makefile which must be executable on
> any
> drive (since it is a network mapping).
> 

The Cygwin way of doing this would be to:
  mkdir /myscripts
  mount -b m:/myscripts /myscripts
Now you can:
  gawk -f /myscripts/script.awk in-file.txt

Let me suggest that in order to make your life easier that you use Cygwin
POSIXly.

Cheers,

=====
Earnie Boyd
mailto:earnie_boyd AT yahoo DOT com

---         <http://earniesystems.safeshopper.com>         ---
--- Cygwin: POSIX on Windows <http://gw32.freeyellow.com/> ---
---   Minimalist GNU for Windows <http://www.mingw.org/>   ---

__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

--
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