- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: grep regular expression performance
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
Discussions
Discussions
Forums
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
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
тАО07-11-2004 11:22 PM
тАО07-11-2004 11:22 PM
grep regular expression performance
Running OSF1 5.1 732:
the following egrep is designed to match a quoted string, possibly containing escaped quotes (\") or other escaped characters.
egrep '"([^\"]+|\\.)*"'
This works fine for small matches like
"abc"
but for longer matches like
"abc abc abc abc abc abc abc abc "
performance degrades severely.
On Sun and other platforms this works fine.
Same problem exists using regexec()
Has anyone seen this before, and is it fixed in a patch?
Alternatively, any workaround?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2004 02:53 AM
тАО07-13-2004 02:53 AM
Re: grep regular expression performance
Have you tried "awk", "gawk" or other *awk(s)? awk has better RE then grep|egrep.
Anyway, to answer your question, for strings like "abc abc abc abc abc abc abc abc", I would use egrep '^abc'. This will match the the first "abc" and move on. But I know this will be a very narrow solution.
Also "sed" has a "g" flag or tag which matches globally for the string, thus without this, it will only match the first instance. Give it a try.
Rdgs
Jov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2004 03:03 AM
тАО07-13-2004 03:03 AM
Re: grep regular expression performance
Wrong Forum.
OSF1 5.1 732 is a 4 year old Tru64 version nicknamed Zulu.
You probably want to retry after moving to a more recent (V5.1B?) baselevel, or at least with a recent patch kit.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2004 03:10 AM
тАО07-13-2004 03:10 AM
Re: grep regular expression performance
Don't be too harsh. HP-UX admins will experience similar problems if HP merge more Tru64 features/fails. ;)
Cheers
Jov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2004 03:52 AM
тАО07-13-2004 03:52 AM