- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find and replace script
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
09-18-2001 05:22 AM
09-18-2001 05:22 AM
In my case, it's mainly written to replace hardcoded hostnames in config files but might be useful to others. Of course it's not too sensitive on files it's looking in, but is a better alternative to vi'ing lots of files individually.
Comments and/or corrections/improvements always welcome.
Later,
Bill
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2001 05:25 AM
09-18-2001 05:25 AM
Re: find and replace script
I was manually changing some webpages using vi just last night. What a tedious process. I only had a console and couldn't use a windows machine.
This will definitely come in handy...
thanks again for sharing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2001 06:42 AM
09-19-2001 06:42 AM
Re: find and replace script
nit-picking really, but here's a few comments:
i) the awk's not really needed because you're executing the cut
ii) the second if block contains a "mv", I reckon this should be a "cp", but...
iii) ...you could combine the 2 if statements into one to cut down on duplicate code (it's running both anyway for "ascii text" files).
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2001 11:33 PM
09-19-2001 11:33 PM
Re: find and replace script
First point, yep, that's what I get for adding to it bit by bit..
the text is there for command text, ascii doesn't show up on my script files...
Although for duplication I couldn't get the || (or) in my if statement, i didn't want to spend too long looking to clean it up, but should really..
Probably should change to cp, but, I don't want to delete files seperately..
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2001 01:54 AM
09-20-2001 01:54 AM
Re: find and replace script
I`ve modified your file.
Unchecked. Could contain syntax errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2001 02:29 AM