0

What I've tried:

  • bash scripts/shell/test.sh
  • sh scripts/shell/test.sh

These were the results:

The term 'bash' is not recognized...

The term 'sh' is not recognized...

enter image description here

2 Answers 2

1

This may sound daft, but if you are in a Powershell shell how will that shell know where to find the bash or sh interpreter? Is it already defined in the environment?

In my opinion you're going to have to tell the Powershell terminal where it should find the bash/sh interpreter, i.e. call bash it with the full pathname

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. My knowledge is very limited on this subject. I have git installed (and git bash). The command sh works on Git bash. Is there a way to add the PATH for the sh command that Git bash uses to Windows environment variables? So that it is also accessible from the PowerShell CLI?
$env:path="$env:path;<path to bash/sh>"
-1

i read you're suppose to use chmod +x scriptname.sh before using the bash command

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.