Xoanan
June 15th, 2007, 01:11 PM
Hi All
I have been reading and trying out the tutorials on Linuxcommand.org, and I have run into a problem.
As you may know, a well formed HTML file contains the following content:
<HTML>
<HEAD>
<TITLE>
The title of your page
</TITLE>
</HEAD>
<BODY>
Your page content goes here.
</BODY>
</HTML>
Now, with what we already know, we could a write a script to produce the above content:
#!/bin/bash
# make_page - A script to produce an HTML file
echo "<HTML>"
echo "<HEAD>"
echo " <TITLE>"
echo " The title of your page"
echo " </TITLE>"
echo "</HEAD>"
echo ""
echo "<BODY>"
echo " Your page content goes here."
echo "</BODY>"
echo "</HTML>"
This script can be used as follows:
[me@linuxbox me]$ make_page > page.html
It has been said that the greatest programmers are also the laziest. They write programs to save themselves work. Likewise, when clever programmers write programs, they try to save themselves typing.
This bit
make_page > page.html
doesn't seem to function. I type it in CLI and I get "command not found", yet it does seem to create an HTML file. I can't see the HTML file when I try to open it with the browser, but the file is there and is labeled as an HTML file.
I know there is something I am missing in this example. Can someone point me in the right direction?
Thanx in advance.:popcorn:
I have been reading and trying out the tutorials on Linuxcommand.org, and I have run into a problem.
As you may know, a well formed HTML file contains the following content:
<HTML>
<HEAD>
<TITLE>
The title of your page
</TITLE>
</HEAD>
<BODY>
Your page content goes here.
</BODY>
</HTML>
Now, with what we already know, we could a write a script to produce the above content:
#!/bin/bash
# make_page - A script to produce an HTML file
echo "<HTML>"
echo "<HEAD>"
echo " <TITLE>"
echo " The title of your page"
echo " </TITLE>"
echo "</HEAD>"
echo ""
echo "<BODY>"
echo " Your page content goes here."
echo "</BODY>"
echo "</HTML>"
This script can be used as follows:
[me@linuxbox me]$ make_page > page.html
It has been said that the greatest programmers are also the laziest. They write programs to save themselves work. Likewise, when clever programmers write programs, they try to save themselves typing.
This bit
make_page > page.html
doesn't seem to function. I type it in CLI and I get "command not found", yet it does seem to create an HTML file. I can't see the HTML file when I try to open it with the browser, but the file is there and is labeled as an HTML file.
I know there is something I am missing in this example. Can someone point me in the right direction?
Thanx in advance.:popcorn: