- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- egrep question
Operating System - HP-UX
1753970
Members
7361
Online
108811
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
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
тАО05-07-2003 06:21 AM
тАО05-07-2003 06:21 AM
egrep question
Can someone explain to me why this would match. To me is should not match the pattern it did. Thanks.
$ egrep "^Subject:.*CMR*" badfile (did find that string)
Subject: PVCS Dimensions Baseline WNP:SCM_WNP_BL1_051503 is now in your pending list $ exit
$ egrep "^Subject:.*CMR*" badfile (did find that string)
Subject: PVCS Dimensions Baseline WNP:SCM_WNP_BL1_051503 is now in your pending list $ exit
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2003 06:24 AM
тАО05-07-2003 06:24 AM
Re: egrep question
Because CMR* means CM followed by ZERO or more R's. So SCM matches that portion.
HTH
-- Rod Hills
HTH
-- Rod Hills
There be dragons...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2003 06:27 AM
тАО05-07-2003 06:27 AM
Re: egrep question
Hello,
Probably is the (.), as special char. If the string you are looking for contains this char, insert a \ before:
egrep "^Subject:\.*CMR*" badfile
Regards, Vicente.
Probably is the (.), as special char. If the string you are looking for contains this char, insert a \ before:
egrep "^Subject:\.*CMR*" badfile
Regards, Vicente.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2003 06:28 AM
тАО05-07-2003 06:28 AM
Re: egrep question
Hi Alan,
could you more specific? how is your badfile look like.
Looks like you are trying to match line start with Subject which has CMR at any place.
Here is whaat happen when I try
hpc-ps3{sachin}% echo "Subject: jadklfj iewui CMR jakdjkl" > badfile
hpc-ps3{sachin}% egrep "^Subject:.*CMR*" badfile
Subject: jadklfj iewui CMR jakdjkl
sachin
could you more specific? how is your badfile look like.
Looks like you are trying to match line start with Subject which has CMR at any place.
Here is whaat happen when I try
hpc-ps3{sachin}% echo "Subject: jadklfj iewui CMR jakdjkl" > badfile
hpc-ps3{sachin}% egrep "^Subject:.*CMR*" badfile
Subject: jadklfj iewui CMR jakdjkl
sachin
Is photography a hobby or another way to spend $
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