- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Editing the Host file
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
04-21-2005 05:23 PM
04-21-2005 05:23 PM
I currently have a file with about 300 lines of the following:
erdpri.salem.gsk.com. 165.156.1.52
erdbck.salem.gsk.com. 165.156.1.53
erdvxt.salem.gsk.com. 165.156.1.54
I need to insert "IN A" (minus the double quotes) in between the
two fields can anyone help me with a script? It needs to look like
this...
erdpri.salem.gsk.com. IN A 165.156.1.52
erdbck.salem.gsk.com. IN A 165.156.1.53
erdvxt.salem.gsk.com. IN A 165.156.1.54
Thanks In advance
George
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2005 05:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2005 05:43 PM
04-21-2005 05:43 PM
Re: Editing the Host file
vi /etc/hosts
:1,$ s/erdbck.salem.gsk.com/erdbck.salem.gsk.com IN A/g
Regards
Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2005 06:07 PM
04-21-2005 06:07 PM
Re: Editing the Host file
try this:
# sed 's/salem.gsk.com./salem.gsk.com. IN A/' /etc/hosts > /etc/hosts.replaced
since the domain name, salem.gsk.com is the common variable to replace.
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2005 06:47 PM
04-21-2005 06:47 PM
Re: Editing the Host file
#vi /etc/hosts
:1,$s/165/IN A 165
vi will replace for U.
HTH
tienna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2005 08:49 PM
04-21-2005 08:49 PM
Re: Editing the Host file
Thanks a lot for the wonderful timely support.Thank got the ITRC support..
Cheers
george