score:2

Accepted answer

you've more or less figure out the first error yourself. when you just run <filename> , it is not in your path environment variable, so you get "command not found". you have to give a full or relative path when to the program in order to run it, even if you're in the same directory as the program - you run it with ./<filename>

when you do run your program, it appears to just exit as soon as you start it - we can't help much with that without knowing what the program does or see some code.

you can do some debugging, e.g. after the program just exits run echo $? to see if it exited with a particular exit value, or run your program using the strace tool to see what it does (or do it the usual way, insert printf debugging, or debug it with gdb)


Related Query

More Query from same tag