|
From: | Chris F.A. Johnson |
Subject: | Re: [Help-bash] Getting PID |
Date: | Sun, 27 Dec 2015 16:23:48 -0500 (EST) |
User-agent: | Alpine 2.10 (DEB 1266 2009-07-14) |
On Sun, 27 Dec 2015, Danny wrote:
Hi guys, I have an application that returns 3 PID's when I do "pidof" ... how would I get only the last PID returned ... address@hidden:pidof application 47223 47229 48101
pid=( $(pidof bash) ) echo "${pid[-1]}" -- Chris F.A. Johnson, <http://cfajohnson.com>
[Prev in Thread] | Current Thread | [Next in Thread] |