- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- A grep Question
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
тАО01-26-2005 03:58 AM
тАО01-26-2005 03:58 AM
I get listener.ora file, I need to extract, only connections done by sql or sqlnav, but no include user like xx,yyy,zz,mmm,etc..
I wrote in HP-UX v11:
cat listener.log | grep -v "hbeans|lsmith" > a1
or
cat listener.log | grep -i sjones -v 'hbeans|lsmith' > a1
But, it does not work, a1 file have nothing.. I probe with single qoute and nothing too.
Any idea...
Thanks...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 03:59 AM
тАО01-26-2005 03:59 AM
Re: A grep Question
cat listener.log | grep -v hbeans | grep -v lsmith > a1
Should work
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 04:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 04:04 AM
тАО01-26-2005 04:04 AM
Re: A grep Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 04:18 AM
тАО01-26-2005 04:18 AM
Re: A grep Question
and it would work faster without cat, e.g.:
# grep -Eiv "hbean|smith|jones" listener.log >a1
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 04:21 AM
тАО01-26-2005 04:21 AM
Re: A grep Question
cat listener.log | grep -v -e "hbeans" -e "lsmith" > a1
And, BTW, not exactly related to your question, but interesting and useful nonetheless...
It is a rather classic misuse or inefficiency to start pipelines with cat in this way. grep takes an input file argument. So something like this for exmple:
cat listener.log | grep -v -e "hbeans" -e "lsmith" > a1
is better written as this:
grep -v -e "hbeans" -e "lsmith" listener.log > a1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2005 07:32 AM
тАО01-26-2005 07:32 AM