tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: $$ broken??
> $ pid=$(sh -c 'ps -oppid -p $$')
> $ pid=${pid#PPID }
Ooh, nice! Thank you.
> Although some old versions of sh don't like the space in that
> pattern.
At worst, and at the cost of another process,
ps -oppid -p $$ | sed -e 1d
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index