delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/16/17:38:43

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
Subject: Re: executing an executable
References: <a46b45460709161336r4db198afoc4ef8693766042ae AT mail DOT gmail DOT com>
From: Markus E L <ls-cygwin-2006 AT m-e-leypold DOT de>
Date: Sun, 16 Sep 2007 23:42:50 +0200
In-Reply-To: <a46b45460709161336r4db198afoc4ef8693766042ae@mail.gmail.com> (Cole Radcliffe's message of "Sun, 16 Sep 2007 15:36:31 -0500")
Message-ID: <3ups0iffs5.fsf@hod.lan.m-e-leypold.de>
User-Agent: Some cool user agent (SCUG)
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

> "Cole Radcliffe" wrote:

> > "Cole Radcliffe" wrote:
> >
> >> I do an ls -la and I see I have an executable called "executable.exe".
> >> I chmod to 777. Then I try to type "execut" and I press tab and it
> >> does not find it. When I type in the entire name and press enter, bash
> >> says the command is not found! It works fine on cygwin-x.
> >
> > Type ./executable or set your PATH variable to include "." (the latter
> > is usually not recommended, even in cygwin, I think).
> >
> > And try to read up about PATH.
> >
> > Regards -- Markus

> I tried "set PATH=.:$PATH" and that did not work. When I echoed the
> $PATH I realized that that command had no effect. What am I doing
> wrong?

You're using bash? Then don't use 'set'. The syntax is

  <varname>=<string-expression>

Instead 

  set <somethings ...>

sets the argument vector $@.

It pays to read an introductory text on using the shell. Use one for
Linux if you like, the shell is the same. Else you'll be pretty
unhappy really soon and back here when (a) You're using shell
metacharacter somewhere, (b) you get quoting problems, (c) you need to
redirekt I/O, (d) You got filenames with whitespace in them or '-' at
the beginning, or (e) some other environment variable setting is wron
-- just to name some of the common problems for shell beginners :-).

And then I expect you'll get flamed sooner or later (more likely
sooner) because this is OT and not cygwin specific and I get flamed
and/or TITTTLed because I even answered.

So really try to look for some documentation on this issues. Time is
running out :-).

Regards -- Markus



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019