[root@aliker keepalived]# echo $PATH /application/mysql/bin:/application/mysql/bin:/application/mysql/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
如上,路径重复,只需输入下面脚本即可
export PATH=$(echo $PATH | tr : "\n"| sort | uniq | tr "\n" :)
[root@aliker profile.d]# echo $PATH /application/mysql/bin:/bin:/root/bin:/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:
转载于:https://blog.51cto.com/12057237/1852048