View Single Post
  #20   Report Post  
Posted to rec.crafts.metalworking
James Waldby James Waldby is offline
external usenet poster
 
Posts: 271
Default Trepanning and Parting Off / Handling URL's

On Mon, 05 May 2008 00:59:21 +0000, DoN. Nichols wrote:
On 2008-05-03, James Waldby wrote:

....
Also, regarding cut-and-paste of broken-up URL's like that, I usually
highlight the whole mess, paste it into Firefox's URL box, then delete
the return characters to fix it, as opposed to cutting and pasting
three separate parts.


O.K. But I normally don't have Opera up and running, so I
invoke it by a script "op" which does a cd to a place where I tend to
save things, then invokes opera via the URL which I cut-and-pasted into
the command line -- and the command line sees the newlines as end of a
command line and the start of another, which of course fails to reach
the place desired and then tries to interpret the other two as separate
commands, which also normally fail. :-) So I have to cut and paste it
one line at a time, and surround the whole thing with double quotes to
keep any stray '?', '%' or similar characters with special meanings to
the shell from having those meanings.

....

Add the following near the beginning of the script:
URL="`xclip -o | tr -d '\n'`"

This will set URL to the contents of the clipboard with newlines
deleted. Adapt as necessary for shells other than sh or bash.

-jiw