Sample Header Ad - 728x90

How can I format output of shell command

1 vote
3 answers
3646 views
I combine top and pidof command: top -p $(pidof ) If pidof return one id top command works. But if pidof more than one ids top command does not work. pidof returns ids with one space between them like : 123 124 125 If I can get these ids with comma like 123, 124, 125 top command will work. How can I change output format of pidof? I know awk was used for formatting text data. But I can not find how can I use awk for result of shell command.
Asked by utarid (433 rep)
Apr 29, 2015, 02:34 PM
Last activity: Apr 29, 2015, 02:52 PM