[root@iZ259r7h4pfZ ~]# whereis rsync
rsync: /usr/bin/rsync /usr/share/man/man1/rsync.1.gz
[root@iZ259r7h4pfZ ~]# whereis rs
rs:
如果安装了,冒号后面是有的
所以判断下
if [ `whereis rsync|awk -F: '{print $2"x"}'|sed "s/ //g"` = "x" ];then echo no rsync ;else echo rsync installed;fi