Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Subject: semicolon colon separated env vars to unix and viceversa To: cygwin AT cygwin DOT com From: "Enrico Spinielli" Date: Thu, 8 Nov 2001 18:47:59 +0100 Message-ID: X-MIMETrack: Serialize by Router on CVDGWY01/S/EXT/MC1(Release 5.0.8 |June 18, 2001) at 08/11/2001 17:48:12 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii 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/