- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Looking for statement which captures the last colu...
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
05-18-2010 12:26 AM
05-18-2010 12:26 AM
Looking for statement which captures the last column
Iam looking for statement which captures the last column in below output. Please help
weblogic 16400 1 0 Feb 14 ? 0:00 /bin/sh ./startwlaffi01-affinium.sh
weblogic 2330 2329 0 Mar 19 ? 0:00 /bin/sh /var/domain/wlhoards01/HOARDS/bin/startWebLogic.sh
weblogic 13254 1 0 May 12 ? 0:00 /bin/sh ./startwlart01-artemis.sh
weblogic 7131 1 0 Feb 21 ? 0:00 /bin/sh ./startwlinte01-Internet.sh
weblogic 3007 3006 0 Mar 19 ? 0:00 /bin/sh /var/domain/wlhelpfiles04/HELPFILES/bin/startWebLogic.sh
weblogic 1953 1952 0 01:17:22 ? 0:00 /bin/sh /var/domain/wlukwww01/wlukwww01/bin/startWebLogic.sh
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2010 12:31 AM
05-18-2010 12:31 AM
Re: Looking for statement which captures the last column
awk '{print $NF}'
And you can use $(NF-1) too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2010 01:46 AM
05-25-2010 01:46 AM
Re: Looking for statement which captures the last column
[root@vm1 ~]# ps -ef | grep rpc
rpc 2330 1 0 11:31 ? 00:00:00 portmap
root 2350 1 0 11:31 ? 00:00:00 rpc.statd
root 2379 1 0 11:31 ? 00:00:00 rpc.idmapd
root 3681 3628 0 11:33 pts/1 00:00:00 grep rpc
[root@vm1 ~]# ps -ef | grep rpc | perl -lane 'print $F[-1]'
portmap
rpc.statd
rpc.idmapd
rpc
[root@vm1 ~]#
Gudluck
Prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2010 01:48 AM
05-25-2010 01:48 AM
Re: Looking for statement which captures the last column
Try following:
# ps -ef | awk /XXX/ '{print $NF}'
Enjoy,Have fun!.
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2010 01:53 AM
05-25-2010 01:53 AM
Re: Looking for statement which captures the last column
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2010 07:09 AM
05-29-2010 07:09 AM
Re: Looking for statement which captures the last column
http://forums.itrc.hp.com/service/forums/helptips.do?#33