delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/07/05:46:57

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
Date: Wed, 7 Aug 2002 11:46:46 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: Re: System Calls
Message-ID: <20020807114646.X3921@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
References: <E3725E2B7548D51192090002A534A18A3368EB AT s2-vic-r1 DOT nrn DOT nrcan DOT gc DOT ca>
Mime-Version: 1.0
In-Reply-To: <E3725E2B7548D51192090002A534A18A3368EB@s2-vic-r1.nrn.nrcan.gc.ca>
User-Agent: Mutt/1.3.22.1i

On Tue, Aug 06, 2002 at 06:23:30PM -0400, Murdoch, Matthew wrote:
> Hi list,
> 
> I am fairly new to cygwin I have a fairly trivial question.  I am trying to
> make a system call using the system function in C.   I have read some of the
> previous postings on the newsgroup, but I am still stuck.   I am trying to
> do the following command, which calls an executable file and supplies it
> with an input file.  It then pipes the output to an otuput file.   
> 
> system("cmd /c c:\"users\"mmurdoch\"ACE\"sixs <
> c:\"users\"mmurdoch\"ACE\"sixSIn.txt
>          > c:\"users\"mmurdoch\"ACE\"sixSOut.txt");
> 
> I do have the "sh.exe" file in my \bin directory.    
> 
> Thanks in advance for the help

What exact error do you see?  "I have a problem" isn't helpful
at all.

What are these \" ?  Don't you mean \\ ?
Why are you running cmd to call the application?  Why not call it
directly:

  system ("/cygdrive/c/users/mmurdoch/ACE/sixs \
           < /cygdrive/c/users/mmurdoch/ACE/sixSIn.txt \
	   > /cygdrive/c/users/mmurdoch/ACE/sixSOut.txt")

?

Or write a shell script and call that?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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