www.delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Subject: | RE: window command in bash |
Date: | Tue, 18 Jul 2006 09:24:23 -0400 |
Message-ID: | <31DDB7BE4BF41D4888D41709C476B65704168D0A@NIHCESMLBX5.nih.gov> |
In-Reply-To: | <03D3B32F0D0D024791C1EE97D087E90907927654@EXCH01.purdue.lcl> |
From: | "Buchbinder, Barry \(NIH/NIAID\) [E]" <BBuchbinder AT niaid DOT nih DOT gov> |
To: | "McGraw, Robert P." <rmcgraw AT purdue DOT edu>, <cygwin AT cygwin DOT com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
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 |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id k6IDOis5007466 |
McGraw, Robert P. wrote: > I have a window command that I want to execute in a bash script. > > In my .bat file the command is > > AgBackup.exe /notext c:\Alligate\agbackupfiles > > I tried to execute this command in a bash window and the command > works but is does not seem to recognize the parameters. The > "c:\alligate...." is the path where a backup is written. In the bash > script the backup file is written in the default location. > > I change the c:\Alligate.... to /cygdrive/c/Alligate/agbackupfiles > but still it wrote the backup file to the default location. > > If I execute the .bat that the above command is in, it works > correctly. > > In a shell script what is the proper way to pass parameters to a > window program? > > Thanks > > Robert > > _____________________________________________________________________ > Robert P. McGraw, Jr. > Manager, Computer System EMAIL: rmcgraw AT purdue DOT edu > Purdue University ROOM: MATH-807 > Department of Mathematics PHONE: (765) 494-6055 > 150 N. University Street FAX: (419) 821-0540 > West Lafayette, IN 47907-2067 A Windows program will think that /cygdrive/c/Alligate/agbackupfiles are options, not a path. Did you quote the path or escape the backslashes to protect the backslashes from the shell interpreting them as escape characters? E.g., AgBackup.exe /notext 'c:\Alligate\agbackupfiles' or AgBackup.exe /notext "c:\Alligate\agbackupfiles" or AgBackup.exe /notext c:\\Alligate\\agbackupfiles You should read <http://cygwin.com/cygwin-ug-net/using-effectively.html> in the Cygwin User's Guide <http://cygwin.com/cygwin-ug-net/>, and especially <http://cygwin.com/cygwin-ug-net/using-effectively.html#id4735437>. -- 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 |