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
07-22-2003 02:32 PM
07-22-2003 02:32 PM
grep
i'm using grep to find out a string from a file say "SUNG".but it grep's all entries with "SUNG".Please help to grep the exact string.
Thanks in Advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 02:54 PM
07-22-2003 02:54 PM
Re: grep
grep 'SUNG' file_name | grep -v 'SUNGA' | grep -v 'SUNGB'
etc, etc for the other variations of SUNG
Best of luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 02:55 PM
07-22-2003 02:55 PM
Re: grep
or grep -e "^SUNG " -e " SUNG " -e " SUNG$"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 03:19 PM
07-22-2003 03:19 PM
Re: grep
Unfortunately grep is not great at matching exact syntax like you want.
For example:
# grep SUNG
This will find all lines with SUNG string, including SUNG, SUNGD, GSUNG ffSUNGfg etc etc.
You need to try and find someway to differentiate the string you are searching for.
Examples:
grep "^SUNG"
All lines that start with SUNG
grep " SUNG "
All lines that have SUNG preceded & followed by a space.
grep -x "SUNG"
All lines that only have SUNG in the line, nothing else.
Hope this might give you some ideas.
If you post the exact string you're trying to match, someone may be able to offer you a solution.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 03:22 PM
07-22-2003 03:22 PM