VAriable Question

hi there,
In my shell script I'm using a variable $ICO to speicfy the type of file that I'm processing e.g. VFR = France.

further in my shell I'm trying to programatically set the sql file thtat I want to run :-

REPORTTXT=/tmp/$ICO3hr.dat

however when I check the value (as below) :-

echo "Report file is $REPORTTXT"

it returns

Report file is /tmp/.dat

What am I forgetting to do folks ??????

Can you post the script here

Here is the relevant section of the script :-

while read line
do
ICO=$(echo "${line}" | awk -F\| '{print $1}')

echo " ICO is $ICO" >> $REPORT
SQLFILE=`grep "^$ICO" $PARFILE | awk -F\| '{print $5}'`
echo "Sql file is $SQLFILE " >> $REPORT
MAILLIST=`grep "^$ICO" $PARFILE | awk -F\| '{print $4}'`
prvdate=`grep "^$ICO" $PARFILE | awk -F\| '{print $2}'`
echo "Logging onto Oracle Database" >> $REPORT
REPORTTXT=/tmp/$ICO3hr.dat

echo "Report file is $REPORTTXT" >> $REPORT

sqlplus -s $DIMENSION_SID @$SQLFILE >> $REPORT
if [ $? -ne 0 ]; then
subject="Three Hour Calls for `date +%x` Error Report"
mail_report $ERRORTXT

#end of driving loop
done < $PARFILE
echo "Process completed `date +%X`" >> $REPORT

The line in RED is the line I'm having trouble with

try running this script with set -x and post the relevent output, which may help to analyze the problem

got it I used "$ICO" in the declaration.

thanks