WSL bash 脚本在安装包时抛出错误

WSL bash script are throwing error installing packages

当我运行这个sh脚本

sudo apt install git -y

使用此命令

sh file.sh

它抛出

E: Command line option '
   ' [from -y
   ] is not understood in combination with the other options.

我在wsl

tr -d '5' <file.sh >file-new.sh