#!/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
不太了解這個錯誤