On Tue, 28 Nov 2000, Klaus Weide wrote: > > >Context: I want to send a long URL on the command line and have the results > > >dump-ed. I'm currently using "/usr/local/bin/lynx -dump -nolist $url", ...snip... > No, that would be the right advice for embedding a URL in HTML (as an HREF > attribute value or otherwise), but not for the command line. > Lynx would be wrong if it interpreted & that is part of a URL passed > on the command line as &. The catch (and somebody mentioned this) is that the & will background the process at the command line. Your $url variable would need to have the & character escaped... ex. \&. If you're doing this from within something like a Perl script, and called: $url = "http://your.server/cgi/dothis?action=something&reason=becauseisaidso"; system("/usr/local/bin/lynx -dump -nolist $url"); The shell would receive that command as: /usr/local/bin/lynx -dump -nolist http://your.server/cgi/dothis?action=something&reason=becauseisaidso and would execute it as two commands, the second of which should error out: /usr/local/bin/lynx -dump -nolist http://your.server/cgi/dothis?action=something& reason=becauseisaidso Now... if you changed the $url varilable to the following: $url = "http://your.server/cgi/dothis?action=something\&reason=becauseisaidso"; It would execute as: /usr/local/bin/lynx -dump -nolist http://your.server/cgi/dothis?action=something\&reason=becauseisaidso And after your shell interprets the escaped character, Lynx would receive the $ARGV values as: $ARGV[0] -dump $ARGV[1] -nolist $ARGV[2] http://your.server/cgi/dothis?action=something&reason=becauseisaids -CA -- Christopher R. Allen --- [EMAIL PROTECTED] -- -- (503) 921-2354 -- http://www.bigfatpipe.net -- ; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED]
Re: lynx-dev Long URL on command line
Christopher Allen [BigFatPipe.Net] Tue, 28 Nov 2000 11:08:58 -0800
- lynx-dev Long URL on command line Sam Hobson
- Re: lynx-dev Long URL on command l... Mike Castle
- Re: lynx-dev Long URL on command l... Lloyd Rasmussen
- Re: lynx-dev Long URL on command l... Klaus Weide
- Christopher Allen [BigFatPipe.Net]
