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
тАО05-16-2002 09:27 AM
тАО05-16-2002 09:27 AM
I am using 11.i and I used the following option in grep command -w to grep for a specific word. (grep -w)
I just found out that -w option doesn't exist on 11.0.
I don't have 11.0 - does anyone know what is 11.0 equvalent of grep -w?
Thanks a lot!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 09:30 AM
тАО05-16-2002 09:30 AM
Re: grep -w
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 09:31 AM
тАО05-16-2002 09:31 AM
Re: grep -w
on a 10.20 box
:/home/H092AHE:Sleeves:>grep -w steve /etc/passwd
grep: illegal option -- w
Have checked man pages for grep -w ( nothing found)
Anyone else ?
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 09:31 AM
тАО05-16-2002 09:31 AM
Re: grep -w
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 09:33 AM
тАО05-16-2002 09:33 AM
Re: grep -w
You can circumvent this by enclosing your string in quotes and providing whitespace, for instance:
# grep -e "^abc" -e " def " -e "abc$"
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 09:33 AM
тАО05-16-2002 09:33 AM
Re: grep -w
It's apparently a new feature of 11i. I don't think there is an equivalent option in HP-UX grep.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 09:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:33 PM
тАО05-16-2002 12:33 PM
Re: grep -w
I've been working on a script the past two days to help me pull the encrypted passwd entry from the respective system accounts in the /tcb/files/auth/* (trusted system dbase area)and pad those entries into field 2 of a temp/psuedo file that resembles the /etc/passwd file. (Basically, recreating the original /etc/passwd file from before the system was trusted.) I can then run this script on any system, extract and pad the necessary encrypted info, then take that output file and run it through the Crack5.0 engine.
Well, to make a long story short. I've been stuck on one particular area of the script. Everything about it worked fine except for one small thing. How to adapt for a search for a user who pulled up multiple matches. i.e. "uucp" would find "uucp and nuucp".
I knew the answer was with using regular expressions, but couldn't find the exact fit. And then I came accross this post today about "grep -w". In fact, I tried playing around with that earlier today, but made no headway. Basically, my problem was I was using the "/" from grep's metacharacter regular expressions. I took these out and it worked fine.
Thanks for the post.
Like I said - To make a short story long!
Just because it is a nice clean way to parse and pad this info I will attatch the script in the event someone wants to use it as they work with Crack. Or if someone can add it to the script archives.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:44 PM
тАО05-16-2002 12:44 PM
Re: grep -w
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:44 PM
тАО05-16-2002 12:44 PM
Re: grep -w
============================
I got this off the forums a while back. I'd give credit to who wrote it, however, it's not in the script nor do I remember ...