This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: semicolon colon separated env vars to unix and viceversa
- To: cygwin at cygwin dot com
- Subject: RE: semicolon colon separated env vars to unix and viceversa
- From: "Karr, David" <david dot karr at cacheflow dot com>
- Date: Thu, 8 Nov 2001 09:52:46 -0800
Just use "cygpath -p -u $CLASSPATH". That does everything you're trying to
do here.
> -----Original Message-----
> From: Enrico Spinielli [mailto:Enrico.Spinielli@marconi.com]
> Sent: Thursday, November 08, 2001 9:48 AM
> To: cygwin@cygwin.com
> Subject: semicolon colon separated env vars to unix and viceversa
>
>
> 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/
>
--
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/