View Single Post
  #1   (View Single Post)  
Old 17th May 2008
c0mrade's Avatar
c0mrade c0mrade is offline
Port Guard
 
Join Date: May 2008
Posts: 41
Default Adding multiple lines into file

I'm trying to figure out how to write multiple lines at the end of a file.. reason why I need this is I'm hosting couple of website on my machine and it gets boring to write every time same lines
Code:
<VirtualHost yourhostname:80>
    ServerAdmin you@your-domain.com
    ServerName your_ip_address
    DocumentRoot /www
    ErrorLog logs/error_log
    CustomLog logs/access_log combined
</VirtualHost>
Is there a way to write a shell script that will insert these lines at the end of the file... any hints indications how to do it ? Thank you in advance ..
Reply With Quote