i want to run a program via script.
normally i type ./program
in the shell and the program starts.
my script looks like this:
#!/bin/sh
cd /home/user/path_to_the_program/
sh program
it fails, i think the last line went wrong...
i know this is childish question but thx a lot!
If ./program
works in the shell, why not use it in your script?
#!/bin/sh
cd /home/user/path_to_the_program/
./program
sh program
launches sh to try and interpret program
as a shell script. Most likely it's not a script but some other executable file, which is why it fails.