- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- running sed inside script 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
11-07-2006 05:32 PM
11-07-2006 05:32 PM
running sed inside script file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 05:49 PM
11-07-2006 05:49 PM
Re: running sed inside script file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 06:41 PM
11-07-2006 06:41 PM
Re: running sed inside script file
try
:1,$s!
So from line 1 to end ($)
using not backspaces but exlaimation marks !
g means global, throughout the whole script.
Escape U do undo if unexpected result.
This should normally solve most quoting problems.
Otherwise give the exact text you want to change inside the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 10:33 PM
11-07-2006 10:33 PM
Re: running sed inside script file
without really encrypting the script fragment you supplied, I suggest to try (its a single line!):
sed 's,
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 10:38 PM
11-07-2006 10:38 PM
Re: running sed inside script file
there is a copy/paste error inside - use:
sed 's,
to get the xml tags you requested.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 01:46 AM
11-08-2006 01:46 AM
Re: running sed inside script file
with what I stated earlier you can do:
To do it from unix prompt outside your script:
sed -e 's!
Where test.sed contains:
after it looks like this:
From within the script with vi mode :
1,$s!
exactly the same result :)
Good luck