LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:43 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration