bash script.sh 1> tmp.log 2>> tmp.log && tail -f tmp.log
if [ ! -d "$HOME/file" ]; then
echo "no file exits!"
fi
if [ $var == 'str' ]; then
echo "string matches!"
fi
printf "\033[33mChecking Start...\033[0m\n"
printf
vs echo
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# linux
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
else
# Unknown.
fi
sh another_scipt.sh
read -p "Proceed (y/n [n])? " choice
case "$choice" in
y|Y )
echo "Yes"
;;
n|N|"" )
echo "No"
esac