pmcmicha
Technical User
- May 25, 2000
- 353
I am running the following script which is spawned from another running script and I need to access the variables in the original script, but cannot seem to do so....
Spawned Script:
#!/usr/bin/ksh -p
TZ=TZ+216
DCOUNT=1
for TIME in 216 192 168 144 120 96 72 48 24
do
TZ=TZ+${TIME}
DAY[${DCOUNT}]=`/usr/bin/date "+%A"`
if [[ "${DAY[${DCOUNT}]}" == "Sunday" ]]
then
let DCOUNT=DCOUNT
else
export "${DAY[${DCOUNT}]}"
let DCOUNT=DCOUNT+1
fi
done
#EOS
Now in the original running script, I just want to print the ${DAY[${COUNT}]} out 7 times with the correct days.
SHELL=KSH 93
UNIX Version: SCO UNIXWARE 7.1.1
Thanks in advance.
Spawned Script:
#!/usr/bin/ksh -p
TZ=TZ+216
DCOUNT=1
for TIME in 216 192 168 144 120 96 72 48 24
do
TZ=TZ+${TIME}
DAY[${DCOUNT}]=`/usr/bin/date "+%A"`
if [[ "${DAY[${DCOUNT}]}" == "Sunday" ]]
then
let DCOUNT=DCOUNT
else
export "${DAY[${DCOUNT}]}"
let DCOUNT=DCOUNT+1
fi
done
#EOS
Now in the original running script, I just want to print the ${DAY[${COUNT}]} out 7 times with the correct days.
SHELL=KSH 93
UNIX Version: SCO UNIXWARE 7.1.1
Thanks in advance.