public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* semicolon colon separated env vars to unix and viceversa
@ 2001-11-08  9:48 Enrico Spinielli
  2001-11-08  9:54 ` Pavel Tsekov
  2001-11-08 10:13 ` Markus Hoenicka
  0 siblings, 2 replies; 5+ messages in thread
From: Enrico Spinielli @ 2001-11-08  9:48 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: semicolon colon separated env vars to unix and viceversa
  2001-11-08  9:48 semicolon colon separated env vars to unix and viceversa Enrico Spinielli
@ 2001-11-08  9:54 ` Pavel Tsekov
  2001-11-08 10:13 ` Markus Hoenicka
  1 sibling, 0 replies; 5+ messages in thread
From: Pavel Tsekov @ 2001-11-08  9:54 UTC (permalink / raw)
  To: Enrico Spinielli; +Cc: cygwin

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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* semicolon colon separated env vars to unix and viceversa
  2001-11-08  9:48 semicolon colon separated env vars to unix and viceversa Enrico Spinielli
  2001-11-08  9:54 ` Pavel Tsekov
@ 2001-11-08 10:13 ` Markus Hoenicka
  1 sibling, 0 replies; 5+ messages in thread
From: Markus Hoenicka @ 2001-11-08 10:13 UTC (permalink / raw)
  To: cygwin

The question is why you would want to do this in the first place. I'm
not aware of a Cygwin JRE, and if you use Sun's native Win32 JRE,
it will not understand the Unix format afaik.

regards,
Markus

Enrico Spinielli writes:
 > 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/
 > 

-- 
Markus Hoenicka, PhD
UT Houston Medical School
Dept. of Integrative Biology and Pharmacology
6431 Fannin MSB4.114
Houston, TX 77030
(713) 500-6313, -7477
(713) 500-7444 (fax)
Markus.Hoenicka@uth.tmc.edu
http://ourworld.compuserve.com/homepages/hoenicka_markus/


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: semicolon colon separated env vars to unix and viceversa
@ 2001-11-08 10:13 Enrico Spinielli
  0 siblings, 0 replies; 5+ messages in thread
From: Enrico Spinielli @ 2001-11-08 10:13 UTC (permalink / raw)
  To: Pavel Tsekov <ptsekov; +Cc: cygwin

On 08/11/2001 18.54.42 ptsekov wrote:
>
> Ciao, Enrico
>
> You can try the "cygpath" utility to perform this task.
>

That is exactly what I did, but I had to decompose the
list of path before using it...

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: semicolon colon separated env vars to unix and viceversa
@ 2001-11-08  9:53 Karr, David
  0 siblings, 0 replies; 5+ messages in thread
From: Karr, David @ 2001-11-08  9:53 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-11-08 10:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-08  9:48 semicolon colon separated env vars to unix and viceversa Enrico Spinielli
2001-11-08  9:54 ` Pavel Tsekov
2001-11-08 10:13 ` Markus Hoenicka
2001-11-08  9:53 Karr, David
2001-11-08 10:13 Enrico Spinielli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).