Bash Script question

From: Hanna Lord (hanna.lord_at_tokenbay.co.uk)
Date: 08/03/04


Date: Mon, 2 Aug 2004 23:33:10 +0100

Hi all,
  I am not sure if this is the correct newsgroup to post in, apologies if it
is... I have been racking my brain with a BASH script problem, I have the
following script which does not work as I expect:

---- START OF SCRIPT ----

#!/bin/bash
project=`echo $PROJ`
echo "project = $project"
ab=`echo $project/scripts | sed 's#$project#/#g'`
echo "result = $ab"

---- END OF SCRIPT ----

I have set the environment variable of PROJ to /home/example
proj = /home/example
ab = /home/example/scripts

I was expecting ab to be:
ab = /scripts

Can anyone help me please, I have racked my brain and can't see the mistake.

Cheers