Simple html script

Here is a little script I came across to create a simple html document on the fly;

touch http.sh
vim http.sh

Insert this code into the new script and modify as needed (it can be as simple of as complex as you would like!)

#!/bin/bash
# make_page - A script to produce a basic HTML file

echo ""
echo ""
echo " "<br /> echo " The title of your page"<br /> echo " "
echo ""
echo ""
echo ""
echo " Your page content goes here."
echo ""
echo ""

now save and close the new script. In Vim use

:wq

then

chmod +x http.sh

to make it executable then

./http.sh > mypage.html

to run the script. It will create the file mypage.html. You can modify this script to include any level of complexity you wish.

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.