Originally posted by: drag
I beleive that you only use "bash filename" when executing a script.
That's the same as putting the #!/bin/bash at the beginning of the script file. (I beleive, never tried to bash filename anything before)
Just do:
./main
If your in the same directory as the executable.
#!/bin/bash
echo '
#include <stdio.h>
main()
{
printf ("Hello World!\n");
}' > ./main.c
gcc -o main ./main.c
./main
#include <stdio.h>
main()
{
printf ("Hello World!\n");
}