From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14434 invoked by alias); 17 Nov 2011 09:57:07 -0000 Received: (qmail 14426 invoked by uid 22791); 17 Nov 2011 09:57:06 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f171.google.com (HELO mail-wy0-f171.google.com) (74.125.82.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Nov 2011 09:56:51 +0000 Received: by wyg24 with SMTP id 24so2188196wyg.2 for ; Thu, 17 Nov 2011 01:56:50 -0800 (PST) Received: by 10.180.95.132 with SMTP id dk4mr41048012wib.30.1321523810275; Thu, 17 Nov 2011 01:56:50 -0800 (PST) Received: from [192.168.2.99] (cpc2-cmbg8-0-0-cust61.5-4.cable.virginmedia.com. [82.6.108.62]) by mx.google.com with ESMTPS id i8sm18005585wie.11.2011.11.17.01.56.48 (version=SSLv3 cipher=OTHER); Thu, 17 Nov 2011 01:56:49 -0800 (PST) Message-ID: <4EC4DA4E.60303@gmail.com> Date: Thu, 17 Nov 2011 09:57:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: filename with HASH References: <32858658.post@talk.nabble.com> <32858723.post@talk.nabble.com> In-Reply-To: <32858723.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-11/txt/msg00297.txt.bz2 On 17/11/2011 00:29, pen wrote: > Few more tests: seems lynx dont like # > > $ mv "test bay#, wwid" "test # abc" > $ lynx -dump "test # abc" > > Can't Access `file://localhost/cygdrive/e/test%20#%20abc' > Alert!: Unable to access document. > > lynx: Can't access startfile > > $ mv "test # abc" "test# a" > $ lynx -dump "test# a" > > Looking up test > Making HTTP connection to test > Alert!: Unable to connect to remote host. << > > lynx: Can't access startfile http://test/#%20a A "#" marks a separator in a URL between the URI part and the anchor within the page to load up the display at. I think lynx is applying the same syntax to local file URLs; for example, if you have a local file "index.html", you can append any arbitrary # anchor to it: > $ wget 'http://www.bbc.co.uk/' > --2011-11-17 09:47:02-- http://www.bbc.co.uk/ > Resolving www.bbc.co.uk (www.bbc.co.uk)... 212.58.246.94 > Connecting to www.bbc.co.uk (www.bbc.co.uk)|212.58.246.94|:80... connected. > HTTP request sent, awaiting response... 200 OK > Length: 135886 (133K) [text/html] > Saving to: `index.html' > > 100%[======================================>] 135,886 446K/s in 0.3s > > 2011-11-17 09:47:03 (446 KB/s) - `index.html' saved [135886/135886] > > > $ ls index* > index.html > > $ lynx -dump "index.html#foobar" > > #[1]A to Z [2]BBC Help [3]Terms of Use > > [4]British Broadcasting Corporation BBC Home [ ... snip ... ] So I think it's a limitation of the URL format that it's ambiguous between a filename with an actual # in it and a filename followed by "#" and an anchor, and there's probably not much lynx can do about it. Your best bet, if you absolutely have to use lynx on files with hash signs in their names, would be to use lynx's -stdin option and redirect the input from the file, so that lynx doesn't ever see the filename at all: > $ lynx -dump "index.html # abc" > > Can't Access `file://localhost/tmp/lynx/index.html%20#%20abc' > Alert!: Unable to access document. > > lynx: Can't access startfile > > $ lynx -stdin -dump < "index.html # abc" > > #[1]A to Z [2]BBC Help [3]Terms of Use > > [4]British Broadcasting Corporation BBC Home [ ... snip ... ] cheers, DaveK -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple