0
I have a BASH script that is used on LINUX and I need to run it on Windows 10.
Is there any way to run correctly without error?
directory_exist.sh
#!/bin/bash
echo "Informe o nome do Diretório"
read ndir
if [ -d "$ndir" ]
then
echo "Diretório existe"
else
`mkdir $ndir`
echo "Directório criado"
fi
I call command so:
$ bash directory_exist.sh
If you install git, I know you can use git bash... which should be a simpler version. And from.
– Bruno Warmling
good I’ll test here;
– Mauro Rocha
Is working.
– Mauro Rocha
Are you using windows 10? if you are you can make a subsystem for example can use a linux distribution in your windows and you will be able to run bash script
– Luciano Alves
Git didn’t satisfy the need, so I’m now using WSL2 with Ubuntu
– Mauro Rocha