Re: <link> not clickable from text document
From: THUFIR HAWAT (hawat.thufir_at_gmail.com)
Date: 07/31/05
- Previous message: Alexander Dalloz: "Re: FEDORA and Pentium D"
- In reply to: Thomas Springer: "Re: <link> not clickable from text document"
- Next in thread: Alexander Dalloz: "Re: <link> not clickable from text document"
- Reply: Alexander Dalloz: "Re: <link> not clickable from text document"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 31 Jul 2005 21:50:15 +0100 To: For users of Fedora Core releases <fedora-list@redhat.com>
On 7/31/05, Thomas Springer <th.springer@gmx.net> wrote:
...
> Try this:
>
> $ sed 's|^http://\(.*/\)\(.*\)|\1|g; s|href="|
> href="http://|g' /input/file/with/links > /output/file/with/clicklinks
>
>
> It's minimal changed from the first example, which didn't things well
> when i tried it out with your uri.
>
>
> Thomas
...
Sorry that I didn't notice that sed was using input and output files,
should've seen that.
I made a dummy with just one link to test the sed command. The link
is entirely on one line, where as if I were to paste it here then it
would wrap, I'm not sure if that's relevant.
Here's the link in dumm.txt, wrapped:
<http://ipac3.vpl.ca/ipac20/ipac.jsp?uri=full=3100001~!1150206~!25&ri=4&aspect=basic_search$>
[thufir@arrakis click]$
[thufir@arrakis click]$ date
Sun Jul 31 21:26:23 IST 2005
[thufir@arrakis click]$ pwd
/home/thufir/click
[thufir@arrakis click]$ ll
total 36
-rw-rw-r-- 1 thufir thufir 0 Jul 31 21:26 clicklist.txt
-rw-rw-r-- 1 thufir thufir 95 Jul 31 21:26 dummy.txt
-rw-rw-r-- 1 thufir thufir 5366 Jul 31 08:37 linklist.txt
-rw-rw-r-- 1 thufir thufir 5366 Jul 31 15:38 linklist.txt.backup
[thufir@arrakis click]$ cat dummy.txt
http://ipac3.vpl.ca/ipac20/ipac.jsp?uri=full=3100001~!1150206~!25&ri=4&aspect=basic_search$
[thufir@arrakis click]$ sed 's|^http://\(.*/\)\(.*\)|<a
href="\1\2">\1</a>|g; s|href="|
href="http://|g' dummy.txt > clicklist.txt
sed: -e expression #1, char 58: unterminated `s' command
[thufir@arrakis click]$
I opened "dummy.txt" from openoffice and the link wasn't clickable,
but I do notice that if I were to e-mail these to myself that they
become clickable from gmail. Still, I'd like to get the sed command
working, partly out of curiousity.
Thanks,
Thufir
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
- Previous message: Alexander Dalloz: "Re: FEDORA and Pentium D"
- In reply to: Thomas Springer: "Re: <link> not clickable from text document"
- Next in thread: Alexander Dalloz: "Re: <link> not clickable from text document"
- Reply: Alexander Dalloz: "Re: <link> not clickable from text document"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]