[CentOS] bash script fails conditional test

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


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.



More information about the CentOS mailing list