- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Include a File in other text file like C Progr...
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
07-06-2006 12:11 AM
07-06-2006 12:11 AM
I want to include a file in other text file in linux like as we were doing while writting "C" Programms for referencing the other files.
Infact I don't want to edit my main file "A"
While I want some changes to take place because of changes in "A" . So I want one more file "B" which will be changes by me frequently and will be included in "A" .
So that the function using file "A" will work efficiently without touching the file "A".
Pls help
Sachin Rajput
HCL
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 12:27 AM
07-06-2006 12:27 AM
Re: Include a File in other text file like C Programs
> cat fileA
# This is file A, and will source fileB
source fileB
# Now file A continues
command ...
command ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 05:48 AM
07-06-2006 05:48 AM
Re: Include a File in other text file like C Programs
If you're talking about shell scripts, either 'source
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2006 08:12 PM
07-07-2006 08:12 PM
Re: Include a File in other text file like C Programs
I have /etc/mail/access file and when I make it it becomes /etc/mail/access.db
But Now I want that in /etc/mail/access I will specify one line which will address to another file so that while making hash file /etc/mail/access.db
It will encrypt both /etc/mail/access and the one specified inside.
Pls Revert.
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2006 11:51 AM
07-09-2006 11:51 AM
SolutionLCL_ACC=/etc/mail/access
LCL_FILE=/etc/mail/access.rejects
LCL_MAP=/etc/mail/access.db
cat $LCL_ACC $LCL_FILE | makemap hash $LCL_MAP
The other thing you can do (if you want to remember the original values) is just to append to the DB using:
echo
This will append '
Of course, if you ever want to get a list of the addresses again, you have to use un-makemap the DB:
makemap -u hash $LCL_MAP
This lists the contents of the DB.
I hope this helps you.