#!/bin/bash
old_ifs=$IFS
IFS=':'
read -ra PATH_ARRAY <<< "$PATH"
IFS=$old_ifs
path_result=""
for m in "${PATH_ARRAY[@]}"; do
if [[ "$m" == *"anaconda"* ]] || [[ "$m" == *"minicanda"* ]];then
continue
else
path_result="$path_result:$m"
fi
done
export PATH=${path_result:1}
echo $PATH
shell 从path剔除所有anaconda相关的环境变量
于 2024-05-15 10:19:28 首次发布
229

被折叠的 条评论
为什么被折叠?



