#!/bin/bash
if [$(cat ~/.bashrc |grep python3)=*'$HOME/python3/bin'*];then
sudo source ~/.bashrc
python3 -V
else
echo ""
echo ""
echo "You need to add \"export PATH=\$PATH:$HOME/python3/bin into
~/.bashrc\""
echo "Then execute \"source ~/.bashrc\""
fi
小弟预期用红字部分来看 bashrc内有无 python3 字眼 预期不是 空字串就是包含
'$HOME/python3/bin'
但是执行结果却出现
./python3_install2: line 2: [=*$HOME/python3/bin*]: No such file or directory
不太了解这个错误