0

So my script looks like this

java -jar asd.jar -a 32
java -jar asd.jar -a 33
java -jar asd.jar -a 36
java -jar asd.jar -a 34
Source /home/surge/stuff/r.sh

The script name is called r.sh I did the permissions thing to make it executable.

For some reason, it won't loop. It just stops working.

0

2 Answers 2

1
  1. Mark file as shel script: #!/bin/bash
  2. change Source to source, shell commands are case sensitive

But better try this one:

#!/bin/bash
while :
do
    java -jar asd.jar -a 32
    java -jar asd.jar -a 33
    java -jar asd.jar -a 36
    java -jar asd.jar -a 34
done
Sign up to request clarification or add additional context in comments.

Comments

0

Replace Source with exec. But it's still ugly soluton for making loops.

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.