|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
windows cmd Newb questionCygwin commands are not working when I run them in windows cmd.exe. Should they?
I ask this question because my scripts are saying "command not found" for each line in them. I'm assuming it's trying to run the commands in windows and they're not working? |
|
|
Re: windows cmd Newb question* zip184 (Mon, 30 Jul 2007 08:28:04 -0700 (PDT))
> Cygwin commands are not working when I run them in windows cmd.exe. Should > they? Yes. > I ask this question because my scripts are saying "command not found" for > each line in them. What kind of scripts? Batch scripts? Shell scripts? > I'm assuming it's trying to run the commands in windows > and they're not working? No. The question you're asking does not make sense at all because the the terms you use ("run the commands in windows") don't exist or don't make sense. "command not found" basically means "command not found". The mechanism with which cmd.exe finds commands is called a "path". The concept of a path is the same for Windows, Linux, NetWare and even Programming Languages (Python, etc.)... Thorsten -- 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/ |
|
|
Re: windows cmd Newb questionI'm trying to run a shell script
|
|
|
Re: windows cmd Newb questionOn 30/07/07, zip184 <btillinghast@...> wrote:
> Cygwin commands are not working when I run them in windows cmd.exe. Should > they? Commands that are exe files are supposed to work. For example perl and grep are both exe files in your bin directory, which is something like C:\Cygwin\bin in Windows terms. If you have that directory in your path, then those commands will work from a regular Windows cmd shell (a "DOS Window"). Anything else is not supposed to work. Commands which are not exe files, for example shell scripts (bash, ksh, etc.) or Perl or Python programs will not work directly from the cmd command line. You need to invoke their interpreter first. -- 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/ |
|
|
Re: windows cmd Newb questioncommands like grep or ls don't work, only regular DOS commands do. Do you know how I can fix this?
|
|
|
Re: windows cmd Newb questionOn 30/07/07, zip184 <btillinghast@...> wrote:
> > commands like grep or ls don't work, only regular DOS commands do. Do you > know how I can fix this? Check that you have your Cygwin bin directory is in the path. Cygwin bin directory is (probably) most often located at C:\Cygwin\bin , but you should check your installation and find its exact location. Then run the DOS command path: c:\> path And check whether your Cygwin bin directory is somewhere in the output. -- 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/ |
|
|
RE: windows cmd Newb questionOn 30 July 2007 16:59, zip184 wrote:
> commands like grep or ls don't work, only regular DOS commands do. Do you > know how I can fix this? Start menu->Settings->Control Panel->System->Advanced->Environment variables. Find 'PATH' in the "System variables" section, click "Edit", append ";C:\cygwin\bin" (without the quotes, and if you installed cygwin anywhere other than C:\cygwin, use that directory name instead). Click "Apply" and "OK" until you've closed the "System Properties". Close cmd.exe, start another one and bingo. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/ |
|
|
Re: windows cmd Newb question* zip184 (Mon, 30 Jul 2007 08:56:06 -0700 (PDT))
> I'm trying to run a shell script Are you sure? Anyway, you already executed the script and got errors. These errros are really unrelated to Cmd.exe or Cygwin. You should first learn the basics (http://tldp.org/LDP/abs/html/) Hint: if the interpreter can't find the commands you're using then tell the interpreter where they are. Either by setting the path (PATH=/usr/bin) or by giving the full path "/usr/bin/grep" instead of "grep"). Again: this has nothing to do Windows, Cmd or Cygwin. Learn the basics: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html -- 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/ |
|
|
Re: windows cmd Newb questionRight click 'My Computer' -> Advanced -> Environment Variables ->
System Variables -> PATH Add the directory of [CygWin]\bin, eg c:\cygwin\bin It needs to be seperated with a ';' -- 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/ |
| Free Forum Powered by Nabble | Forum Help |