Create a HTML Document using shell script in Linux :-> You can - TopicsExpress



          

Create a HTML Document using shell script in Linux :-> You can actually create a HTML document using the shell script. If you are tired to see the output of your command in the terminal, you can redirect your output to the HTML document. This will allow you to see the output in the web browser like the website. I will assume, you know the basics of HTML. Even if you don’t, it’s very easy to learn. Find some good tutorials and get started.Now, let’s get started by writing a simple shell script with HTML tags in it. #!/bin/sh echo "" echo "" echo "" echo "Output in a HTML Document" echo "" echo "" echo "" cat freshtutorial echo "" echo "" This simple shell script called “test” will display the file called freshtutorial which I have already created in my home directory. Every HTML tags have to be quoted with echo. Redirect the script to HTML document. sh test >> test.html Open the test.html and see the output. Instead of creating a output into the terminal itself, it redirects the output to a webpage. We don’t want to put echo in every HTML tags. This will make our job tedious and dirty. Thus to simplify this we will use “ display.html This all might seem confusion at the beginning. Once you get used to it, it feels amazing. It is a nice cool shell programming trick as well. If you have any confusion, feel free to ask questions as comment. more at :-> worldbloglog.tk/
Posted on: Sun, 30 Jun 2013 05:24:39 +0000

Trending Topics



Recently Viewed Topics




© 2015