bash shell -- how to get it to add the current directory to my path - Unix

This is a discussion on bash shell -- how to get it to add the current directory to my path - Unix ; I'm trying to compile and run helloworld.c with Cygwin -- this may not be the right group to ask this question. It compiles, but when I type "helloworld" or "helloworld.exe" at the command prompt, it says "command not found." How ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: bash shell -- how to get it to add the current directory to my path

  1. bash shell -- how to get it to add the current directory to my path

    I'm trying to compile and run helloworld.c with Cygwin -- this may not be
    the right group to ask this question. It compiles, but when I type
    "helloworld" or "helloworld.exe" at the command prompt, it says "command not
    found." How do I get my shell to run executables from the current directory
    without having to type the path?

    Thanks



  2. Re: bash shell -- how to get it to add the current directory to my path

    On 2007-10-08, Grande News wrote:
    >
    >
    > I'm trying to compile and run helloworld.c with Cygwin -- this may not be
    > the right group to ask this question. It compiles, but when I type
    > "helloworld" or "helloworld.exe" at the command prompt, it says "command not
    > found." How do I get my shell to run executables from the current directory
    > without having to type the path?


    The simplest is to type: ./helloworld

    You can add the current directory to your PATH variable
    (PATH=$PATH:.), but it is not recommended for security reasons.

    --
    Chris F.A. Johnson, author |
    Shell Scripting Recipes: | My code in this post, if any,
    A Problem-Solution Approach | is released under the
    2005, Apress | GNU General Public Licence

+ Reply to Thread