![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to call the c library created by shc | alfredo | High Level Programming | 1 | 03-31-2008 09:26 AM |
| How to call the c library created by shc | alfredo | Shell Programming and Scripting | 0 | 03-31-2008 09:20 AM |
| how to call awk in a csh Program | bikas_jena | Shell Programming and Scripting | 5 | 11-25-2007 02:24 AM |
| how to differentiate system call from library call | muru | UNIX for Advanced & Expert Users | 2 | 07-19-2007 08:20 PM |
| how to call a perl script from tcsh? | megastar | Shell Programming and Scripting | 1 | 10-22-2005 02:48 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
tcsh user failed to call library in ksh program
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: Code:
tornado:/tmp # cat nir.ksh
#! /bin/ksh
cdromPath=`pwd`
FPATH=${cdromPath}/lib
infra_lib > /dev/null
slogen
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="-"
}
#------------------------------------------------------------------
Code:
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 ------------------------------------------------------- Code:
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 How should I configure tcsh users to identify libraries? Thanks in advance, Nir |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
OK folks,I found a solution:
chmod -R 666 ${cdromPath}/lib solve my problem. Nir |
|||
| Google The UNIX and Linux Forums |