Sagar wrote:
i have a compled c file ... with output file as a.out ( or any
other name ) But this file is executed only on giving # ./(filename) how do i convert it into a executable so that it executes only on giving the filename ( like in Windows as file.exe )
If you don't specify the absolute path to the program executable (like ./a.out), the shell looks for the program in the $PATH Just do "echo $PATH" on your command line and see the output.
So, you can add the current directory (denoted by a dot) to the $PATH --
export PATH=$PATH:.
Now see if it works.
-Manish