This probably isn't the best way to do this, but it sort of works.
Code:
echo "#CMS.sh"
echo -n "Title of post: "
read title
echo -n "Text: "
read text
echo "<i>" >>date
date >>date
echo "</i>" >>date
echo "<p>" >>new.html
cat date >>new.html
echo "</p>" >>new.html
echo "...................." >>new.html
echo "<h1>"$title"</h1>" >>new.html
echo $text >>new.html
cat index.html >>old.html
cat old.html >>index.html
cat new.html >>index.html
rm -f new.html old.html date
what I want to do is add new text to an html file at the top of the page.
The following is what I get when I run it.
Quote:
Tue Apr 15 22:34:48 CDT 2008
....................
old title
old text
Tue Apr 15 22:34:53 CDT 2008
....................
new title
new text
Tue Apr 15 22:34:48 CDT 2008
....................
old title
old text
I'm trying to get it to look like
<new post>
<old post>
Thanks in advanced for any help.