1

Help with sed and inserting text from another file

view story
linux-howto

http://www.unix.com – I need to insert text from one file into another file after specific term. I guess sed is the best method of doing this and I can insert a specified text string using this script but I am not sure how to modify it to insert text from another file: Code: #!/bin/sh sed 's/\<VirtualHost *:80>/.*/&\nINSERTED_TEXT/' /etc/apache2/sites-available/default > /apache2/sites-available/default.tmp mv /etc/apache2/sites-available/default.tmp /etc/apache2/sites-available/default Thanks (HowTos)