delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <f60fe000804300310p193f77f6qb445e5494b3d2684@mail.gmail.com> |
Date: | Wed, 30 Apr 2008 06:10:58 -0400 |
From: | "Mark J. Reed" <markjreed AT mail DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: File path to URI |
In-Reply-To: | <6910a60804300101o6810f60fnc919ed1446a5d94e@mail.gmail.com> |
MIME-Version: | 1.0 |
References: | <BAY119-W550E7D78EA92093BDA5EEEA9D90 AT phx DOT gbl> <6910a60804300101o6810f60fnc919ed1446a5d94e AT mail DOT gmail DOT com> |
X-Google-Sender-Auth: | f3a86fa444a63ddf |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
You really should put double quotes around "$1". Cygwin of all places ought to be an environment that reminds shellscripters to do that... :) On 4/30/08, Reini Urban <rurban AT x-ray DOT at> wrote: > > Has anyone seen a command line tool for converting path (e.g. > /cygdrive/h/privat/news_alert.conf) to file URI > (file:///cygdrive/h/privat/news_alert.conf) > > > > Yes, tweaking with string concatenation or calling some java code would > be a way, though I would prefer some proper command within the cygwin - bash > domain. > > > $ cat > fileuri <<EOF > echo -n "file:///"; cygpath -m $1 > EOF > > $ ./fileuri ~ > file:///d:/data/URBANR/My Documents > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Problem reports: http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <markjreed AT gmail DOT com> -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |