Hello to everyone
This is my first post here, I'm new in Fedora and I came some weeks ago from Ubuntu (since Fedora 15 beta was available)
I like to program sometimes, and in Ubuntu I just used gedit and a little script I did that worked pretty well with my C files, as I didn't like too much the compilers and I love the gedit syntax
I wrote this (at the beginning of the C source code):
Code:
/*
#!/bin/bash
gcc program.c -o program -lm
./program
*/
And I just had to double click the source file (ofc I gave it "Execution permission" ages ago), select "Run in terminal" and it did all itself, giving me the program from just that, from the source code
Here, if I follow the normal steps to compile the program manually, it works perfectly, but if I try this script, it gives me the following error:
/home/user/Program/program.c: line 1: /bin: Is a directory
I know it's shouldn't be right at all to execute a bash script from a .c code that then compiled itself, but it used to work, so I was wondering where is the difference
I have gcc installed and "which bash" gives me the "/bin/bash", so I think that's right
Also, I'm using the stable version of Fedora 15, and I post this question because I didn't find the answer anywhere
Thank you so much!