[CentOS] bash script fails conditional test

Sun Apr 19 17:25:23 UTC 2015
Laurent Wandrebeck <l.wandrebeck at quelquesmots.fr>

Tim Dunphy <bluethundr at gmail.com> a écrit :

> Hey all,

Hi,

-e checks file existence. As you don’t have a file named 26979 in your  
pwd, test fails logically.
If you want to know if variable is set, you can use -z $pid. You could  
also try -d /proc/$pid.

HTH,
Laurent.