DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 17th May 2008
c0mrade's Avatar
c0mrade c0mrade is offline
Port Guard
 
Join Date: May 2008
Posts: 41
Thanked 0 Times in 0 Posts
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
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP read file contents - Maximum file size cksraj Programming 1 21st September 2009 11:38 AM
Deleting lines with certain letters/keywords. bigb89 Programming 4 12th November 2008 11:59 PM
Putting Lines to Together. bigb89 Programming 4 24th September 2008 03:59 AM
Adding a separate /home JMJ_coder NetBSD General 2 29th August 2008 10:45 AM
Having trouble adding 7.0 to GRUB 0.97 Arenlor FreeBSD General 4 26th June 2008 01:02 AM


All times are GMT. The time now is 07:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick