Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: calling dos program from a zsh script



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



Messages sorted by: Reverse Date, Date, Thread, Author