Register
It is currently Sat Oct 25, 2014 1:00 pm

Bash Script That Creates Title Page


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Tue Mar 05, 2013 7:02 pm   

Joined: Tue Mar 05, 2013 6:56 pm
Posts: 1
I'm trying to create a bash script that will create cover pages for various essays I do at school. It seems like the best way to output the text in a title page format is to write the information to an html file. At this point what I have looks something like this, but with more variables:

#!/bin/bash

echo Content-type: text/html
echo "Enter name"
read name

/bin/cat << EOM
<HTML>
<HEAD>
<TITLE>$name</TITLE>
</HEAD>

EOM

/bin/cat title-file.txt




Any suggestions for fixing this bad script?


Top
 Profile  
 PostPosted: Wed Mar 06, 2013 3:53 pm   

Joined: Mon Mar 02, 2009 3:03 am
Posts: 550
hi,

what does make you say it's a bad script?


Top
 Profile  
 PostPosted: Sun Mar 17, 2013 8:44 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 669
Location: Des Moines, Iowa
I write a lot of my scripts to be menu driven, or ask questions then use the answers ... Seems like there are many questions you could ask and get input for. Title, date could be automatic, your name static, etc...then use those variables in the report HTML output.


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP