X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: Date: Wed, 30 Apr 2008 06:10:58 -0400 From: "Mark J. Reed" To: cygwin AT cygwin DOT com Subject: Re: File path to URI In-Reply-To: <6910a60804300101o6810f60fnc919ed1446a5d94e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <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 Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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 < 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 -- 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/