.DEF file in HP-UX Shell scripting [message #215955] |
Wed, 24 January 2007 07:18 |
frank.svs
Messages: 162 Registered: February 2006
|
Senior Member |
|
|
Hi Pals,
I need some information related .DEF file in HP-Ux shell scripting. What actaully a .DEF file contains. It is having all definitions of some functions. But what is the relationship between a .def file and shell script. Can anyone give some examples.
Thanks in Advance.
Best Regards,
frank
|
|
|
|
|
|
Re: .DEF file in HP-UX Shell scripting [message #216117 is a reply to message #216113] |
Thu, 25 January 2007 01:27 |
frank.svs
Messages: 162 Registered: February 2006
|
Senior Member |
|
|
But this is my actual requirement.
Hi pals,
This is what i am looking for actaully. I have two file in my dir. One is "sample" which is an executable file and one is file which is containing all definitions (i.e Functions and var's). Now i am working Ksh and my requirement is that, i need to able to make use of functions defined in .def file, in my actaul executable file i.e "Sample" but i am not getting. Can anyone please help me out.
Here is what i have done.
$cat sample
echo $(a)
echo $(b)
test1
test2
$cat source.def
################################################################################
#
# NAME: SOURCE_DEFINITIONS.DEF
#
################################################################################
typeset a=10
typeset b=20
test1()
{
echo "****** I am in Test-1 *****"
}
test2()
{
echo "****** I am in Test-2 *****"
}
$pwd
/home/manu/quest
$ls
sample source.def
$
$ksh
$ ls -l sample
-rwxrwxr-x 1 maheshv manu 34 Jan 25 12:46 sample
$
$ ./sample
./sample: line 1: a: command not found
./sample: line 2: b: command not found
./sample: line 3: test1: command not found
./sample: line 4: test2: command not found
$
$
$sample
Regards,
franky
|
|
|
|
|
|