delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/07/19:32:38

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <3DCAFE9C.6040907@etr-usa.com>
Date: Thu, 07 Nov 2002 17:00:28 -0700
From: Warren Young <warren AT etr-usa DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Cygwin-L <cygwin AT cygwin DOT com>
Subject: Re: CYGWIN Installer should setup a root environment variable
References: <Pine DOT GSO DOT 4 DOT 44 DOT 0211060108050 DOT 24745-100000 AT slinky DOT cs DOT nyu DOT edu> <3DC9C265 DOT 5030804 AT pobox DOT com>
X-Note: This E-mail was scanned by Declude JunkMail (www.declude.com) for spam.

Chris Walters wrote:
>> `cygpath -w /`
> 
> This is fine, but how do I use the result in a DOS bat script? 

The short answer is: Get a real shell.

The long answer is: While there may be some hack to trick a Microsoft 
command shell into setting an environment variable from a command's 
output, it seems to me that it would be a lot easier to port your BAT 
file to Bash.  There's certainly nothing in the cmd.exe "SET" 
documentation about doing this.

About the only time that only a BAT file will do is for autoexec.bat.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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