Need urgent sed help

I am writing a shell script on SunOS cosuaah01 5.9 Generic_118558-11 sun4u sparc SUNW,Sun-Fire-V440
machine. The shell script in.sh looks like this:

install_top=`pwd`
fl2=/d01/applptch/ptchora/iAS/Apache/Apache/cgi-bin/cxtool/display_report.pl
echo $fl2
mv $fl2 $fl2.old
sed 5c\ '$install_top = "'$install_top'";' $fl2.old > $fl2

and the display_report.pl looks like this:
#!/d01/applptch/ptchora/iAS/Apache/perl/bin/perl
use CGI;
CGI::ReadParse();
$debug = 0; # Set this to 1 to see the form fields values entered.
$install_top = "really";
$perf_user = "haha.";

I want to change the $install_top to the pwd returned in the shell script. Put I keep getting
sed: command garbled: 5c $install_top = "/TST/cxtool";

This works fine in Linux. Not sure why its not working in Solaris. Please help!!

Anyone? I am new to sed and awk and not sure if I am doing something wrong here? This is urgent. Please do write your thoughts.

Try :

sed "5c\\\$install=$install_top;" $fl2.old > $fl2

Jean-Pierre.

Pour l'urgent, c'est d�j� fait
Pour l'impossible, c'est en cours
Pour un miracle, pr�voir un d�lai...

Bhatia,
As Aigles said, follow the rules and do not bump up the questions.
See if this works for you:

sed "5c\ $install_top = $install_top;\\" $fl2.old > $fl2

I got this syntax to work:

#! /usr/local/bin/bash
install_top=/test1/test2/test3
fl2=./display_report.pl
echo $fl2
sed "5c\\
\$install_top = $install_top
"  < $fl2

\ is special to the shell, so you need \\ so sed will see \
replacement text must be on next line and sed needs to see the newline chars too, at least my sed needs this...

Thanks for all your replies. Wasnt aware of the policy. Will keep it in mind. Anyways..the solutionby Perderabo worked..but I was wondering if using the bash shell is necessary?

Normally, I use ksh. Since you were on Linux, I tried it with bash. Linux usually uses bash. Try it with whatever shell you prefer.