- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- creating a script to change file data
Operating System - OpenVMS
1748114
Members
3415
Online
108758
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
Discussions
Discussions
Forums
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
тАО07-11-2006 01:44 AM
тАО07-11-2006 01:44 AM
creating a script to change file data
can any one help me create a unix script that will change for me the host name and the ip address in the following files:
tnsnames.ora
lister.ora
tnsnames.ora
lister.ora
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2006 02:03 AM
тАО07-11-2006 02:03 AM
Re: creating a script to change file data
Ahmed,
Wrong forum. This is OpenVMS ...
Wim
Wrong forum. This is OpenVMS ...
Wim
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2006 02:03 AM
тАО07-11-2006 02:03 AM
Re: creating a script to change file data
Ahmed,
This is the OpenVMS Forum. If you want a UNIX script, it will be more productive to post this question in one of the UNIX or LINUX forums.
- Bob Gezelter, http://www.rlgsc.com
This is the OpenVMS Forum. If you want a UNIX script, it will be more productive to post this question in one of the UNIX or LINUX forums.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2006 02:05 AM
тАО07-11-2006 02:05 AM
Re: creating a script to change file data
Hello Ahmed,
Welcome to the OPENVMS forums, but you probably wanted to be in some Unix forum.
And you proabbly need to fix listener.ora
Just go into the editor and do it?
I guess you have to do this on many systems?
Just use SED -E
or PERL.
Something along the lines of
perl -pie 's/(\(\s*HOST\s*=\s*)\S+/${1}NEWNAME/i' file
That says
-p = loop through input and pritn each line when done
-i = in place replace of output file.
-e = here comes the progra
Look for and remember () a string that starts with
- an open param
- optional whitespace
- the word HOST
- optional whitespace
- and = sign
- optional whitespace
and is followed byt some NON-whitespace (\S+)
Replace ( s/x/y/ ) that all of that, but the remembers (HOST= and the new name.
(untested!)
Enjoy,
Hein,
Welcome to the OPENVMS forums, but you probably wanted to be in some Unix forum.
And you proabbly need to fix listener.ora
Just go into the editor and do it?
I guess you have to do this on many systems?
Just use SED -E
or PERL.
Something along the lines of
perl -pie 's/(\(\s*HOST\s*=\s*)\S+/${1}NEWNAME/i' file
That says
-p = loop through input and pritn each line when done
-i = in place replace of output file.
-e = here comes the progra
Look for and remember () a string that starts with
- an open param
- optional whitespace
- the word HOST
- optional whitespace
- and = sign
- optional whitespace
and is followed byt some NON-whitespace (\S+)
Replace ( s/x/y/ ) that all of that, but the remembers (HOST= and the new name.
(untested!)
Enjoy,
Hein,
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP