Re: Plain text file on web server, questions please...



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.
.



Relevant Pages

  • Re: why doesnt this work
    ... positive number in a for loop, ... echo 'foo'; ... Someone with an equal problem some weeks ago turned out to have something like '12' instead of '12', which will be interpreted as 0 when cast to an integer, but seems OK when just echo'ed & viewed in a browser. ...
    (comp.lang.php)
  • Re: OT: HTML (WAS: MF having issues?)
    ... Right, the example above, with the tag, comes from web developers inapporpriately depending on undocumented features. ... But let's say I don't actually read the standards, but just try out the tag to see what it does, and I notice that on my particular browser, the tag displays the text in italics. ... So now my HTML page may be broken, for example, if it contained text like this: ...
    (comp.lang.cobol)
  • Re: Timing using Transponders
    ... >which is attached to the competator, and a mat is placed at the finish which ... up the tag via a transmitted EM field from the loop in the track. ... The loops in professional gear are embedded into the track, and don't have mats. ... Since the transponders are active transmitters, then the loop would only have to ...
    (sci.electronics.design)
  • Re: Refresh of photo upload page in Browser too quick
    ... Images are served separately from the main html file, based on the tag. ... Rather, I suspect you're building the code based on the old file and placing the old filename in it. ... And instead of fetching the image, the browser is looking in its cache and just using that image. ... Then, after a refresh, your code generates a new tag with the new filename, so the browser gets the updated image (or, in the case of a deleted image, the code generates no tag). ...
    (comp.lang.php)
  • Re: OT: HTML (WAS: MF having issues?)
    ... But let's say I don't actually read the standards, but just try out the tag to see what it does, and I notice that on my particular browser, the tag displays the text in italics. ... So now my HTML page may be broken, for example, if it contained text like this: ... The idea is that browsers who do not recognize the <applet> tag will simply ignore that tag, and display the text without any special formatting. ...
    (comp.lang.cobol)