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 executye this command in a bash window and the command works but
is does not seem to recognize the parameters. The c:\alligate
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
In a shell script what is the proper way to pass parameters to a window
program?
Parameters are passed normally but special characters have to be
quoted.
The backslashes (\) are interpreted by the shell, so quote each of them
by
entering \\
- - - - - Appended by Scientific Atlanta, a
On Tue, 18 Jul 2006, Buchbinder, Barry (NIH/NIAID) [E] wrote:
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
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. [snip]
In a shell script what is the proper way to pass parameters
Buchbinder, Barry (NIH/NIAID) [E] wrote:
Igor Peshansky wrote:
On Tue, 18 Jul 2006, Buchbinder, Barry (NIH/NIAID) [E] wrote:
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
On Tue, 18 Jul 2006, mwoehlke wrote:
Buchbinder, Barry (NIH/NIAID) [E] wrote:
Igor Peshansky wrote:
On Tue, 18 Jul 2006, Buchbinder, Barry (NIH/NIAID) [E] wrote:
Did you quote the path or escape the backslashes to protect the
backslashes from the shell interpreting them as escape
Igor Peshansky wrote:
Exactly. Case in point: UNC paths. Both \\machine\share
and\machine\share will refer to the string '\machine\share'. To
really reference a UNC path, you'll need to say machine\\share.
So why not double the backslashes anyway and save yourself the confusion?
Personally
8 matches
Mail list logo