delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
From: | "Dave Korn" <dk AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
Subject: | RE: g77, Windows XP Professional, CALL System(Command, Status) |
Date: | Fri, 19 Mar 2004 15:34:28 -0000 |
MIME-Version: | 1.0 |
In-Reply-To: | <E1B4LmG-00016A-00@mrelayng.kundenserver.de> |
Message-ID: | <NUTMEGKufVma0osA91E000001b7@NUTMEG.CAM.ARTIMI.COM> |
X-OriginalArrivalTime: | 19 Mar 2004 15:34:29.0562 (UTC) FILETIME=[AB3AB1A0:01C40DC7] |
> -----Original Message----- > From: cygwin-owner On Behalf Of Lars Steinke > Sent: 19 March 2004 15:19 > if I use: > > call system('cls') > > I get the following (new) message: > > cls: not found > > If I write the cls-command manually in the Win-XP-shell, it works. > If my program tries to invoke the cls command in the > Win-XP-shell it does not work? That's presumably because cls is a builtin command to the XP shell, rather than a separate executable; presumably the system command is trying and failing to execute a program called "cls.exe". Instead, try passing cls to the shell like this: > call system('cmd.exe /c cls') You'll probably also need to do the same for other commands such as 'cd' or 'dir' if you ever want to use them in system calls. BTW, I see you're using cygwin. That trick is also very useful in bash shell: I have things like alias cls='cmd /c cls' alias start='cmd /c start ' in my .bashrc 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |