Re: Plain text file on web server, questions please...
- From: Bit Twister <BitTwister@xxxxxxxxxxxxxxxx>
- Date: 17 Jun 2007 16:08:55 GMT
On Sun, 17 Jun 2007 17:07:37 +0200 (CEST), Ohmster wrote:
Bit Twister <BitTwister@xxxxxxxxxxxxxxxx> wrote in
<pre>
I got it, but what does the <pre> tag mean or do? I've never heard of it.
Edit aa.html, remove the <pre> </pre> lines, save it and see what
aa.html looks like in your browser.
That's about rigth, but this time you close the </pre> tag.
Heheh. not a bad guess there.
What is that <pre> tag? Did you make that up or is it a real html tag,
Well, I am not Micro$not, and if I did, what would a browser do with
unknown directives. 8-)
Ahhhh, yes, I see. I will try this and get back to you. Not sure about
this though as I think I would need <A href= tags.
Really?, If using firefox, middle click the
http://tldp.org/LDP/abs/html/index.html
text.
How could a header and a footer insert such tags into a decent sized
text document?
They can/do not.
I saved the rest but it adds to the confusion right now
Sorry, you mentioned "
all I did was to reduce the URL size to the online document as such:
Version 1.3.2 - June 17th, 2007"
I thought you wanted a little automation to manage those variables and
file name for documents.
on how to get a href= tags into a text document at this moment.
Well if you are hellbent on adding the html format, you use a while
loop to read text file
while read line ; do
(code to parse, find, format new string, output to other file here)
done < faq.txt
you can use the index string function to find htt in $line in above
snippet, that position can then be used with other string functions or
set to parse your line, munge in your code, and output the new line.
Hint: http://www.tldp.org/LDP/abs/html/refcards.html#AEN19450
You can use set to parse words in $line into the $1, $2,... arguments
and use a while loop to run through them looking for something to do.
Here click up a terminal, to see what you can do. Just cut, paste
commmads in terminal and see what happens.
line=" todays tip http://www.tldp.org/LDP/abs/html/refcards.html#AEN19450"
set - $line
echo $1
shift
echo $1
shift
echo $1
So it becomes a simple matter of programming to have a while loop to
loop through args checking if start of $1 has http
and doing something like
_wd="<A HREF=\"${1}/\"${1}</A>"
_new_line="$_new_line $_wd"
if $1 does not start with http, then
_new_line="$_new_line $1"
When done with line processing,
echo $_new_line >> $_html_fn
_html_fn contains the name of the output file.
.
- Follow-Ups:
- Re: Plain text file on web server, questions please...
- From: Ohmster
- Re: Plain text file on web server, questions please...
- References:
- Re: Plain text file on web server, questions please...
- From: Bit Twister
- Re: Plain text file on web server, questions please...
- From: Ohmster
- Re: Plain text file on web server, questions please...
- Prev by Date: Re: Plain text file on web server, questions please...
- Next by Date: Re: Plain text file on web server, questions please...
- Previous by thread: Re: Plain text file on web server, questions please...
- Next by thread: Re: Plain text file on web server, questions please...
- Index(es):
Relevant Pages
|