Hi folks,
I'm trying to organize functions in my ksh program into libraries.
If I run my program as any ksh user it will succeed.
Only when I run my program as tcsh user (i.e oracle) I failed.
Example
The ksh code:
tornado:/tmp # cat nir.ksh
#! /bin/ksh
cdromPath=`pwd`
FPATH=${cdromPath}/lib
infra_lib > /dev/null
slogen
The library code:
tornado:/tmp> cd lib/
tornado:/tmp/lib> cat infra_lib
############################################################################################
#------------------------------------------------------------------
slogen()
{
flow
flow ; echo "Installation version 5.0"; flow
echo "\n\n"
sleep 2
}
#--------------------------------------------------------------------
#------------------------------------------------------------------
flow()
{
i=0
until [ i -eq 55 ] ; do
echo "$symbol\c" ; i=`expr $i + 1`
done
echo "\n"
symbol="-"
}
#------------------------------------------------------------------
tornado:/tmp # su - nsternfe
No mail for nsternfe
tornado:/home/nsternfe> echo $SHELL
/bin/ksh
tornado:/home/nsternfe> cd /tmp
tornado:/tmp> ./nir.ksh
./nir.ksh[5]: infra_lib: function not defined by /tmp/lib/infra_lib
-------------------------------------------------------
Installation version 5.0
-------------------------------------------------------
Now I'm trying to run the ksh as user oracle:
tornado:/tmp # su - oracle
tornado:/home/oracle >
tornado:/home/oracle > cd /tmp
tornado:/tmp > echo $SHELL
/bin/tcsh
tornado:/tmp > ./nir.ksh
./nir.ksh[6]: slogen: not found
As you can see,the function slogen in the library can not be found.
How should I configure tcsh users to identify libraries?
Thanks in advance,
Nir