The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
passing a list of dynamic names to a "PS" command in shell script?
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
passing a list of dynamic names to a "PS" command in shell script?
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
11-21-2007
Klashxx
HP-UX/Linux/Oracle
Join Date: Feb 2006
Location: Almerķa, Spain
Posts: 383
U can try (in ksh):
Code:
awk -F\: '/^ram?*/ {print $1}' /etc/passwd|xargs -i ksh -c 'ps --o user,fname |grep {}'
Regards
Last edited by Klashxx; 11-21-2007 at
01:27 AM
..
Klashxx
View Public Profile
Find all posts by Klashxx