1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| echo $PATH | tr : "\n"| sort
排序
echo $PATH | tr : "\n"| sort | uniq | tr "\n" :
给环境变量排序
export PATH=$(echo $PATH | tr : "\n"| sort | uniq | tr "\n" :)
删除第三处
export PATH=echo $PATH | cut -d":" -f1,2,4-
删除第八行
export PATH=$(echo $PATH | cut -d":" -f1-7,9-)
|