- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sed issue?
Operating System - HP-UX
1748285
Members
4057
Online
108761
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
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
тАО06-17-2005 07:53 PM
тАО06-17-2005 07:53 PM
Dear all,
Could you please tell me what's the meaning of:
grep -E '^exception:' $LOG | sed 's=[^.]*.\([0-9]*\).*=\1='
I can't find any clue of "s=..." in the manual of sed.
Thanks
Jack
Could you please tell me what's the meaning of:
grep -E '^exception:' $LOG | sed 's=[^.]*.\([0-9]*\).*=\1='
I can't find any clue of "s=..." in the manual of sed.
Thanks
Jack
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2005 08:16 PM
тАО06-17-2005 08:16 PM
Solution
s/regular expression/replacement/flags
Any character can be used instead of /.
In your case they used equal sign (=).
This sed command will match some text not containing dot character (.), followed by dot (.), followed by zero of more numbers, followed by zero of more characters. Numbers matched after the dot will be returned (\1).
hello world blah.123 hello world
and will return 123.
Any character can be used instead of /.
In your case they used equal sign (=).
This sed command will match some text not containing dot character (.), followed by dot (.), followed by zero of more numbers, followed by zero of more characters. Numbers matched after the dot will be returned (\1).
hello world blah.123 hello world
and will return 123.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2005 08:54 PM
тАО06-17-2005 08:54 PM
Re: sed issue?
The '=' character is being used as a delimiter in sed, i.e. instead of the default '/' character.
As for the sed command, it looks like its looking for a number of non-dot characters, followed by a dot (.), followed by a number, followed by other characters. In its place it was put just the number, i.e. abcdef.12345ghijk will become 12345.
Hope this helps.
-Santosh
As for the sed command, it looks like its looking for a number of non-dot characters, followed by a dot (.), followed by a number, followed by other characters. In its place it was put just the number, i.e. abcdef.12345ghijk will become 12345.
Hope this helps.
-Santosh
Life is what's happening while you're busy making other plans
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2005 09:19 PM
тАО06-17-2005 09:19 PM
Re: sed issue?
It's resolved.
Thank you both experts!
Jack
Thank you both experts!
Jack
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