I have command called serverspec-init which prompts
Select OS type:
1) UN*X
2) Windows
Select number:
Now I have manually enter value 1 or 2. But I want to automate this so when i run script it automatically pick the value from variable and give input here.
I can't get my WSL installation working, for some reason, but I believe that you're looking for the
$OSTYPEenvironment variable. On my Ubuntu machine, the value islinux-gnuand a MINGW shell givesmsys.Note that you'll need to make sure that your script is explicitly running BASH.