Hi,
I had a scripts which calls two function. One function will call another function, script is working fine but the second function is not calling the first function. Below is the script
#!/usr/bin/ksh
fun1() {
echo $DATETIME >> Test1.ksh
return 0
}
fun2() {
typeset DATETIME=`date +%Y%m%d' '%T`
fun1
return 0
}
When I run the above script in which I'm calling fun1 in fun2. But I'm not able to see any data in Test1.ksh and it is a zero size file. Help me in understanding why the DATETIME was not written to Test1.ksh file.
Thanks,
Raju