0
ps -o etime,pid,tty,comm -u "$user" | while read etime  pid tty comm

This is the code snippet of my script and here ps -o command not applicale in HP unix.But it is available in solaris and aix.

So,for getting this is there any other options available?

Holger Just
  • 52,918
  • 14
  • 115
  • 123
user1507
  • 41
  • 3
  • 10

1 Answers1

0

ps -o should work, but you need to set an environment variable to specify the UNIX standard. According to my notes, you should set the following

11.23 - UNIX95
11.31 - UNIX_STD=2003

But just setting UNIX95 seems to work on either, so my notes may be wrong. One or the other will probably work for 11.26 though. Check the man page for ps, it should have some more info.

Andrew Schlei
  • 377
  • 4
  • 5