Just use echo "<VirtualHost *>" >> /www/conf/httpd.conf and so on...
steve -----Original Message----- From: Jesse Angell [mailto:[EMAIL PROTECTED]] Sent: 06 June 2002 10:18 To: [EMAIL PROTECTED] Subject: Re: scripting Okay I used SED worked great.. turned hours of work into less then a second.. Now here is where it gets trick to me.. I need to add <VirtualHost *> DocumentRoot /var/www/virtual/$user/html Servername $user.palaceunlimited.com ErrorLog /var/www/virtual/$user/logs/error_log CustomLog /var/www/virtual/$user/logs/access_log combined </VirtualHost> to /www/conf/httpd.conf How do I use SED to add this to the very bottom of httpd conf ?? please help out asap thanks -------------- Jesse Angell PalaceUnlimited.com #1 Palace Host ----- Original Message ----- From: "Paul Branston" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 06, 2002 2:52 AM Subject: Re: scripting > On Thu, Jun 06, 2002 at 02:11:31AM -0500, Jesse Angell wrote: > > Okay, > > There is a file lets call it user.conf > > on line 23 of the file there is a line that says > > user=blahblah > > I want to have a varible in a script.. $user = john > > that edits user.conf and changes user=blahblah to user=thevarible$user... > > How would I do this. > > sed can do it but you need to write the script to a temporary > file then move it back over the original file. > > sed "s/user=\(.*\)/user=${thevariable}\1/" < user.conf > a > mv a user.conf > > Alternatively use an embedded ed script. > > thevariable=whatsup > ed - user.conf << EOE > /user= > s/user=\(.*\)/user=${thevariable}\1/ > w > q > EOE > > > > > _______________________________________________ > Redhat-list mailing list > [EMAIL PROTECTED] > https://listman.redhat.com/mailman/listinfo/redhat-list > _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list