Please correct my script if it any exceptional, since im calling other external script with in my script.
#!/bin/bash
FE1=TMM
DT1=/home/myHome/dated_1
REPORT=/home/otherHome/Report.sh
## Run the report for FE1 & DT1
cd /home/myHome
SERV_LST=/home/myHome/srvc-lst
echo "Welcome to other home"
echo "Running The Report for You NOW"
for i in `cat $SERV_LST`
do
$REPORT $i -f {FE1} -d {DT1}
done
if [ $? -ne 0 ]
then
echo " There is Some Issue"
fi
exit 1
Content of DT1
20110603
20110606
20110612
20110711
20110724
20110811
Content of SERV_LST
-a myServiceService -o myServiceBillCycleList
-a myServiceService -o myServiceCTypeInfo
-a myServiceService -o myServiceDTypeInfo
-a myServiceService -o myServiceHpptt
-a myServiceService -o myServiceLargeBan
-a myServiceService -o myServiceMarketInfo
-a myServiceService -o myServiceParameterValues
-a myServiceService -o myServiceSecurityInfo
-a myServiceService -o myServiceStaticIp
-a myServiceService -o myServiceTin
-a myResourceInfoService -o TMSAvailableNxx
-a myResourceInfoService -o TMSEnrollResourceHistoryList
-a myResourceInfoService -o TMSEnrollTalkGroupList
-a TMSEnrollInfoService -o TMSAslAccount
-a TMSEnrollInfoService -o TMSEnrollAttributes
-a TMSEnrollInfoService -o TMSEnrollBasicInfo
-a TMSEnrollInfoService -o TMSEnrollSer
-a TMSUsageService -o TMSEnrollBilledU
-a TMSUsageService -o TMSEnrollUnbilledU
-a TMSUsageService -o TMSEnrollUnbilledUs
-a myTMSService -o AuthenticateUserLogin
-a myTMSService -o UpdateEPassword
-a myTMSService -o UpdateMailPasscode
-a myTMSService -o validateAccountPin
-a SmsPreference -o TMSSmsPrefeInfo
-a SmsPreference -o UpdateSmsPreferenceInfo
-a StatusCenterService -o TMSStatusCenterMessages
-a EnrollManagementService -o ManageEnrollServices
-a EnrollManagementService -o SetEnrollMarketingPreference
-a EnrollManagementService -o SubmitOrder
-a EnrollManagementService -o UpdateEnrollDetails
\
This script is needed to generate hundreds of reports, which is time consuming. The result im getting is nothing but a nested script usage, that means my script is having problem with usage parameter.
Nested Script Usage parameter is something like this:
./report.sh -a TMSServ -o updateTime -f XYZ -d DATE