2


I am writing a shell script(abcd.sh) and executing on windows 10.

mvn clean install
echo "TESTING"


When I am running it using

sh abcd.sh

then I am not getting any output in the screen. I am not sure the maven command is getting executed or not.
The second line is also never getting printed on the screen.

6
  • how are you running a shell script on windows? by installing bash? Commented Mar 22, 2018 at 5:25
  • windows power shell supports shell Commented Mar 22, 2018 at 5:32
  • have you tried putting an echo before mvn line? Maybe, mvn path is not correctly set Commented Mar 22, 2018 at 5:34
  • echo is working fine when I am putting in first line. and mvn is working fine when running in power shell Commented Mar 22, 2018 at 5:39
  • just in case if you want Unix/Linux like terminal on windows: unix.stackexchange.com/a/194615/109344 Commented Mar 22, 2018 at 7:24

1 Answer 1

1

If you are using Windows 10 ,you can use bash. To enable bash in Windows 10:

  • Click the Start button , click Control Panel, click Programs, and then click Turn Windows features on or off.

  • Enable Windows Subsystem for Linux(Beta)

  • To get Bash installed, open Command Prompt and type “bash”. enter image description here

Also , You can log the console output of maven commands in a text file and verify if the command was executed or not.

e.g.

mvn clean install --log-file output.txt
Sign up to request clarification or add additional context in comments.

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.