Shell脚本解读
总阅读次
文章目录
runbefore.sh
sed -i ‘s/export BASE.*//g’ /etc/profile
将字符
export BASE.*
以及字符后面的字符串 都删除
echo “export BASE=/etc/xiandian/“ >>/etc/profile
将””里的字符串 写入到/etc/profile
注意单引号双引号都可以,
>
后面可以接不接空格
source /etc/profile
立刻生效,而不用重新登录