pidofproc function in functions script

Bauke Jan Douma bjdouma at
Mon Jul 2 13:14:15 PDT 2007

Dan Nicholson wrote on 02-07-07 21:29:

> but it was broken somehow. Still have to investigate that. So, yeah
> the test should come after the for loop, but the for loop needs to be
> fixed, too. It might have to have two loops to account for multiple
> pids.
> while read line; do
>   for pid in $line; do
>     ...
>   done
> done < $pidfile

sed 's/[[:space:]]/\n/g' <$pidfile |\
while read pid
         echo $pid
	# do something


More information about the lfs-support mailing list