SUMMARY: sed help

From: Bhavesh Shah <>
Date: Wed Oct 12 2005 - 15:56:06 EDT
Well I got response from other forum just after I posted here.
Sorry for the trouble.

The correct way is:

Sed '/insert/r source_file' final_file > result_file

Best Regards

-----Original Message-----
From: Bhavesh Shah
Sent: Wednesday, October 12, 2005 12:40 PM
Subject: sed help

Hi Gurus,

Sorry for the off topic. I am trying to get the script working but am
stuck. I tried googling and other unix forum but unable to get this
working so finally I turned to you gurus. I am struggling to get this
working since yesterday. If you can help me will be great help for me.

#! /bin/ksh

SOURCE=`cat source_file`

echo $SOURCE

sed '{



}' final_file > result_file

cat source_file




cat final_file


If source_file has only one line it works but multiple line fails with
sed error. The problem is my source_file is a variable and i can't put
it directly inside sed command.

Any help is greatly appreciated.

Sorry for the trouble.


sunmanagers mailing list
sunmanagers mailing list
Received on Wed Oct 12 15:56:56 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:52 EST