tjbradford
Technical User
do
ps -a |grep desktop -c
if [[ $? -eq 0 ]] ; then
remotedesktopclient
sleep2
fi
done
I believe that the above should loop forever and if it sees apps that contain the word desktop in the ps -a list then it will show a value greater than one then after two seconds it will loop again.
if a user closes that app it will show a value of 0 and open the remotedesktopclient then pause there until it closes, again if closed will go back to the begining of this sentience , so why doesn't it work ?
it looks good to my tiny bit trained bash eye's
ps -a |grep desktop -c
if [[ $? -eq 0 ]] ; then
remotedesktopclient
sleep2
fi
done
I believe that the above should loop forever and if it sees apps that contain the word desktop in the ps -a list then it will show a value greater than one then after two seconds it will loop again.
if a user closes that app it will show a value of 0 and open the remotedesktopclient then pause there until it closes, again if closed will go back to the begining of this sentience , so why doesn't it work ?
it looks good to my tiny bit trained bash eye's