public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 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
* 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

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 10:13 semicolon colon separated env vars to unix and viceversa Enrico Spinielli
  -- strict thread matches above, loose matches on Subject: below --
2001-11-08  9:53 Karr, David
2001-11-08  9:48 Enrico Spinielli
2001-11-08  9:54 ` Pavel Tsekov
2001-11-08 10:13 ` Markus Hoenicka

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