| delorie.com/archives/browse.cgi | search |
| 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: | <3BEAC6E2.541CC349@syntrex.com> |
| Date: | Thu, 08 Nov 2001 18:54:42 +0100 |
| From: | Pavel Tsekov <ptsekov AT syntrex DOT com> |
| X-Mailer: | Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) |
| X-Accept-Language: | en |
| MIME-Version: | 1.0 |
| To: | Enrico Spinielli <Enrico DOT Spinielli AT marconi DOT com> |
| CC: | cygwin AT cygwin DOT com |
| Subject: | Re: semicolon colon separated env vars to unix and viceversa |
| References: | <OF77D5934B DOT B98E7E47-ONC1256AFE DOT 005D98E0 AT uk DOT marconicomms DOT com> |
Ciao, Enrico
You can try the "cygpath" utility to perform this task.
Enrico Spinielli wrote:
>
> Hi,
> I wanted to transform my CLASSPATH env var settings (yes, I
> am using Java :-) from Windows format (semicoln-separated
> list of win paths) to Unix format (colon separated list of
> unix paths) and here is an excerpt of the script I have written:
> #!/bin/bash
> # change an env var from Windows format (semicolon separated)
> # to Unix format (colon separated)
> IFS=@
> for i in ${1//;/@}
> do
> a=${a}:$(cygpath -u $i)
> done
> echo $a
>
> This works fine but I am wondering if there is something else
> given that PATH is automatically converted by cygwin...
>
> Any idea?
> bye
> Enrico
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |