git bash 和 linux bash 区分

if [[ $OSTYPE =~ linux* ]] ;then
    echo linux bash
else
    echo maybe windows bash
fi

https://stackoverflow.com/questions/394230/how-to-detect-the-os-from-a-bash-script

你可能感兴趣的:(shell,BAT,git,bash,linux)