I'm having trouble with a bash script (in Linux) I'm running from Java. It
works -- some of the time, but I can't determine exactly why it works 1
time and doesn't work the next 4-5 times.
I'm not sure, but the script seems more likely to work if I run it directly
from bash. I was thinking of running a small script and, within the
script, calling bash directly to execute the program, something like:
#!/bin/bash
bash /usr/local/myprog/setup
I know Java runs the command on its own, so it isn't using bash or any other
shell. Will this force my setup program to be run under bash? Are there
any side effects or considerations that might not be obvious to a
self-taught coder?
Thanks for any insight or feedback on this problem!
Hal
works -- some of the time, but I can't determine exactly why it works 1
time and doesn't work the next 4-5 times.
I'm not sure, but the script seems more likely to work if I run it directly
from bash. I was thinking of running a small script and, within the
script, calling bash directly to execute the program, something like:
#!/bin/bash
bash /usr/local/myprog/setup
I know Java runs the command on its own, so it isn't using bash or any other
shell. Will this force my setup program to be run under bash? Are there
any side effects or considerations that might not be obvious to a
self-taught coder?
Thanks for any insight or feedback on this problem!
Hal
Comment