To store the output in a variable

Hi,

I am getting the following error while executing the script. Please can someone throw some light where is the problem. Many thanks.

./check[53]: temp: not found
The directory related to SEP instance 4 does not exist.

The script is as follows.

SEP_APP="/scp/sepx/app
/scp/sepx/current/app
/scp/sepx/data
/scp/sepx/output
/scp/sepx/shared
/scp/sepx/log
/scp/sepx/backup
/scp/sepx/install
/scp/sepx/dump
/scp/sepx/journal
/scp/sepx/versions
/scp/sepx/oss
/scp/sepx/sockets
/scp/sepx/support"

MAX_SEP_INSTANCE="1 2 3 4"

for number in `echo $MAX_SEP_INSTANCE`
do
echo
echo "check the directory structure for SEP instance $number..."; echo
for file in $SEP_APP
do
temp = `echo $file | sed -e "s/\/sepx/\/sep$number/"`
if [ ! -d "$temp" ]
then
echo "The directory $temp related to SEP instance $number does not exist."; echo
continue
fi
done

done

Drop the whitespace before and after =

temp=`echo $file | sed -e "s/\/sepx/\/sep$number/"`

Many thanks.