The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-10-2007
Sudhakar333 Sudhakar333 is offline
Registered User
 

Join Date: Jul 2007
Posts: 7
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
Reply With Quote
Remove advertisements
!!
Forum Sponsor