HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Including file with internal functions within a sh...
Operating System - HP-UX
1826312
Members
4395
Online
109692
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2005 01:52 AM
04-27-2005 01:52 AM
Greetings,
I am writing a set of administration scripts.
I have already written a “library” of internal functions.
In order to reuse easily the written code in other shell scripts I would like to include it from another file without having to write it in the body of each shell script…
Can this be done?
Any help/suggestion is highly appreciated.
TIA.
Kind Regards,
Rui
I am writing a set of administration scripts.
I have already written a “library” of internal functions.
In order to reuse easily the written code in other shell scripts I would like to include it from another file without having to write it in the body of each shell script…
Can this be done?
Any help/suggestion is highly appreciated.
TIA.
Kind Regards,
Rui
"We should never stop learning"_________ rui.vilao@rocketmail.com
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2005 02:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2005 02:16 AM
04-27-2005 02:16 AM
Re: Including file with internal functions within a shell script
you use the FPATH variable to define where the shell looks for function definitions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2005 02:25 AM
04-27-2005 02:25 AM
Re: Including file with internal functions within a shell script
Hi Rui,
Try FPATH
FPATH allows a list of function library directory names to be accessed. The shell will search through the directory list until it finds a file that matches the name of the funcion being used.
You can use autoload to declare a function from an external script.
Autoload is an alias for "typeset -fu"
Hope this helps,
Renarios
Try FPATH
FPATH allows a list of function library directory names to be accessed. The shell will search through the directory list until it finds a file that matches the name of the funcion being used.
You can use autoload
Autoload is an alias for "typeset -fu"
Hope this helps,
Renarios
Nothing is more successfull as failure
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP