- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- searches with the grep command
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
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
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
11-09-2017 08:59 AM
11-09-2017 08:59 AM
searches with the grep command
I am new to HPUX. I am having some trouble formulating a command within grep to search for a specific message as follows: vx_nospace - /dev/vg02_eva/lvol4 file system full
Is there anyone wiling to help? I know it needs to start with the grep command but no matter how I assemble the command, I cant get it to find "no_space" or "file system full"
Thanks in advance
- Tags:
- grep searches
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2017 10:50 AM
11-09-2017 10:50 AM
Re: searches with the grep command
> [...] a command within grep to search for a specific message [...]
Do you want to search in one file or in multiple files?
> [...] no matter how I assemble the command, [...]
Some examples of failed attempts would have been more useful than
that. With my weak psychic powers, I can only try to guess what you
might be doing wrong.
> I cant get it to find "no_space" or "file system full"
One explanation for the first part of that would be that the message
shown says "_nospace", not "no_space".
pro3$ echo 'vx_nospace - /dev/vg02_eva/lvol4 file system full' >
fred.txt
pro3$ grep 'file system full' fred.txt
vx_nospace - /dev/vg02_eva/lvol4 file system full
pro3$ grep 'file system empty' fred.txt
pro3$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2017 07:55 PM
11-12-2017 07:55 PM
Re: searches with the grep command
> grep to search for a specific message as follows: vx_nospace - /dev/vg02_eva/lvol4 file system full
If you're looking for a fixed prefix and fixed suffix, you can use:
grep 'vx_nospace.*file system full' file