LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-26-2005, 07:45 AM   #1
Asadullah Rathore
LQ Newbie
 
Registered: Sep 2005
Posts: 4

Rep: Reputation: 0
Regarding function autoloading


Dear All,
I have a case where if i create a function in ksh say
function tester
{
echo "Hello"
}
and I want to load this function on the environment so that the next time whenever I type in tester on the prompt it displays the output attributes of the function as in like a binary.(Say cat , man).
Even if i have the word in a sample file and if i execute say ./sample(If the random file name is sample).
It should output hello.
What is the solution
 
Old 09-26-2005, 08:31 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,483

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I'm not sure to understand exactly what you ask for, but I suspect the answer is by setting the FPATH variable anyway, and put your tester script there.
 
Old 09-26-2005, 08:36 AM   #3
Asadullah Rathore
LQ Newbie
 
Registered: Sep 2005
Posts: 4

Original Poster
Rep: Reputation: 0
I shall be very grateful if you could give a sample example of using FPATH variable and exporting it to environment.

This could help me in calling a function from any file desired , in the shell.

Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding function Autoloading Asadullah Rathore Linux - General 1 09-26-2005 09:46 AM
Autoloading ipw2200 1.0.4 Snyke Linux - Software 0 06-25-2005 06:20 AM
Autoloading of Modules CooManChu Linux - General 2 01-20-2005 02:11 PM
autoloading dependent modules saajii Programming 1 09-15-2004 12:04 AM
Autoloading modules Rotten Deadite Linux - Newbie 3 03-25-2002 05:19 PM


All times are GMT -5. The time now is 04:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration