GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- to Sridhar: sed again
Operating System - HP-UX
1855764
Members
12511
Online
104103
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
back
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
10-25-2001 01:00 PM
10-25-2001 01:00 PM
Hi Sridhar:
Here is my last post about sed
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0815ec7c4fc4d5118ff10090279cd0f9,00.html
If I don't want to use temp file for those comment remove and want everything run in memory, how to do so?
Thanks for your reply,
Shawn
Here is my last post about sed
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0815ec7c4fc4d5118ff10090279cd0f9,00.html
If I don't want to use temp file for those comment remove and want everything run in memory, how to do so?
Thanks for your reply,
Shawn
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2001 01:09 PM
10-25-2001 01:09 PM
Solution
Not Sridhar, but if I read his script and your file corrctly just change:
for i in `grep -v "=" $FILE`
to
for i in `grep :$ $FILE (if the file has no spaces after the :)
or
for i in `grep -v -e "=" -e "*" $FILE` (if you cannot rely on tight formatting)
for i in `grep -v "=" $FILE`
to
for i in `grep :$ $FILE (if the file has no spaces after the :)
or
for i in `grep -v -e "=" -e "*" $FILE` (if you cannot rely on tight formatting)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2001 01:43 PM
10-25-2001 01:43 PM
Re: to Sridhar: sed again
Shawn,
There are many experts in this forum. So you don't need to ask for a specific person. Moreover, if you post it in general, you may get a far better script than mine.
Alan's is a good way.
You can combine your for statement if you don't want tmp$$ files (Somehow I am used that way)
In the original script replace the "for i"
statement with this..
...
for i in `sed '/^*d/' $FILE |grep -v "="`
do
..
-Sri
There are many experts in this forum. So you don't need to ask for a specific person. Moreover, if you post it in general, you may get a far better script than mine.
Alan's is a good way.
You can combine your for statement if you don't want tmp$$ files (Somehow I am used that way)
In the original script replace the "for i"
statement with this..
...
for i in `sed '/^*d/' $FILE |grep -v "="`
do
..
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2001 02:38 PM
10-25-2001 02:38 PM
Re: to Sridhar: sed again
Small mistake.......sorry.. time to go home.
sed '/^*d/' should be sed '/^*/d'
d should be after 2nd /.
-Sri
sed '/^*d/' should be sed '/^*/d'
d should be after 2nd /.
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
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.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP