To create a HTML file using shell script you need to write the HTML CODE under a UNIX HERE document and display the same using CAT command.
Following is the sample UNIX code that will generate the HTML page.
#!bin/bash
#This script will produce a HTML file
cat << EOF
<html>
<head>
<title>Hello World!</title>
</head>
<body>
This is my first HTML Page created using Shell Script
</body>
</html>
EOF
Following is the sample UNIX code that will generate the HTML page.
#!bin/bash
#This script will produce a HTML file
cat << EOF
<html>
<head>
<title>Hello World!</title>
</head>
<body>
This is my first HTML Page created using Shell Script
</body>
</html>
EOF
No comments:
Post a Comment