zsh-users
 help / color / mirror / code / Atom feed
* calling dos program from a  zsh script
@ 2005-03-21 13:32 zzapper
  2005-03-21 16:17 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: zzapper @ 2005-03-21 13:32 UTC (permalink / raw)
  To: zsh-users

Hi,

I wanted to call

sja.exe /somepath/params.xml

from a zsh script.

where sja.exe is a dos aware utility

This wouldn't work as sja always complained that it couldn't find param.xml

The same script worked as soon as I change the bang to #!/bin/sh

I guess this is because zsh is somehow interpreting the /somepath/params.xml before passing it on.

How do I tell zsh to just pass it on.

(i've a feeling I've already had a similar problem)




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: calling dos program from a  zsh script
  2005-03-21 13:32 calling dos program from a zsh script zzapper
@ 2005-03-21 16:17 ` Bart Schaefer
  2005-03-21 17:06   ` zzapper
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2005-03-21 16:17 UTC (permalink / raw)
  To: zsh-users

On Mar 21,  1:32pm, zzapper wrote:
}
} sja.exe /somepath/params.xml
} 
} This wouldn't work as sja always complained that it couldn't find param.xml
} 
} I guess this is because zsh is somehow interpreting the
} /somepath/params.xml before passing it on.

Actually it's more likely because zsh is NOT interpreting the path, and
bash (or whatever /bin/sh is) DOES interpret it.

That is, the DOS utility is probably expecting \somepath\params.xml
but zsh passes it through unchanged with forward slashes instead.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: calling dos program from a  zsh script
  2005-03-21 16:17 ` Bart Schaefer
@ 2005-03-21 17:06   ` zzapper
  2005-03-21 21:30     ` Michael Schaap
  0 siblings, 1 reply; 4+ messages in thread
From: zzapper @ 2005-03-21 17:06 UTC (permalink / raw)
  To: zsh-users

On Mon, 21 Mar 2005 16:17:13 +0000,  wrote:

>On Mar 21,  1:32pm, zzapper wrote:
>}
>} sja.exe /somepath/params.xml
>} 
>} This wouldn't work as sja always complained that it couldn't find param.xml
>} 
>} I guess this is because zsh is somehow interpreting the
>} /somepath/params.xml before passing it on.
>
>Actually it's more likely because zsh is NOT interpreting the path, and
>bash (or whatever /bin/sh is) DOES interpret it.
>
>That is, the DOS utility is probably expecting \somepath\params.xml
>but zsh passes it through unchanged with forward slashes instead.

The line

 sja.exe /somepath/params.xml

works when typed from the zsh prompt, but not from inside a little script


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: calling dos program from a  zsh script
  2005-03-21 17:06   ` zzapper
@ 2005-03-21 21:30     ` Michael Schaap
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Schaap @ 2005-03-21 21:30 UTC (permalink / raw)
  To: zzapper; +Cc: zsh-users

On 21-Mar-2005 18:06, zzapper wrote:

>On Mon, 21 Mar 2005 16:17:13 +0000,  wrote:
>
>  
>
>>On Mar 21,  1:32pm, zzapper wrote:
>>}
>>} sja.exe /somepath/params.xml
>>} 
>>} This wouldn't work as sja always complained that it couldn't find param.xml
>>} 
>>} I guess this is because zsh is somehow interpreting the
>>} /somepath/params.xml before passing it on.
>>
>>Actually it's more likely because zsh is NOT interpreting the path, and
>>bash (or whatever /bin/sh is) DOES interpret it.
>>
>>That is, the DOS utility is probably expecting \somepath\params.xml
>>but zsh passes it through unchanged with forward slashes instead.
>>    
>>
>
>The line
>
> sja.exe /somepath/params.xml
>
>works when typed from the zsh prompt, but not from inside a little script
>
>  
>
% sja() { /path/to/sja.exe `cygpath -w $1` }   # put this in your .zshrc 
or something
% sja /somepath/params.xml

 - Michael


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-21 21:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-21 13:32 calling dos program from a zsh script zzapper
2005-03-21 16:17 ` Bart Schaefer
2005-03-21 17:06   ` zzapper
2005-03-21 21:30     ` Michael Schaap

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).