Hi,
I am trying to write a script which will read inputs form user and process those files, I have issue reading the input parameters in a loop. Following is the script...
Code:
I run the script as ./Script.sh 3 table1 table 2 table3
NumberOfTables=$1
let TableCount=1
while [ ${NumberOfTables} -gt 0 ]
do
TableName='$'$TableCount
db2 "runstats on table ${TableName} and indexes all"
let TableCount=TableCount+1
let NumberOfTables=NumberOfTables-1
done
exit 0