- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- simple grep query
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
тАО08-03-2005 12:57 AM
тАО08-03-2005 12:57 AM
I've got two processes running both concerning TSM.
One process is
root 659500 1 0 Aug 01 - 0:00 /usr/tivoli/tsm/client/ba/bin/d
smcad -optfile=/file1
The other is
root 659500 1 0 Aug 01 - 0:00 /usr/tivoli/tsm/client/ba/bin/d
smcad.shared -optfile=/file1
I want to be able to grep for 'dsmcad' for the first one, or 'dsmcad.' for the second one
i.e. How to run grep and have them pick up ONE of the entries only
ps -ef | grep "dsmcad." picks up both
Thanks in advance
Russ
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2005 01:05 AM
тАО08-03-2005 01:05 AM
Re: simple grep query
UNIX95= ps -o pid= -C dsmcad
or
UNIX95= ps -o pid= -C dsmcad.shared
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2005 01:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2005 01:08 AM
тАО08-03-2005 01:08 AM
Re: simple grep query
ps -ef | grep 'dsmcad[^.]'
will match the first
and
ps -ef | grep 'dsmcad\.'
will match the second
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2005 01:12 AM
тАО08-03-2005 01:12 AM
Re: simple grep query
Try:
ps -ef|grep "dsmcad " don't forget the blank space .-)
and
ps -ef|grep "dmscad."
Enjoy :)
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2005 04:15 AM
тАО08-03-2005 04:15 AM
Re: simple grep query
UNIX95= ps -fC dsmcad
UNIX95= ps -fC dsmcad.shared
Although the UNIX95= looks strange, this is how you define a temporary variable for the name process. Don't set or export UNIX95 in your shell, just use it on the command line as shown.
Bill Hassell, sysadmin