This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sh script works, zsh script doesn't

On 26 May 2006 06:29, Vidiot wrote:

> But, if anyone has a clue as to why starting of a Windblows program from
> a Z-shell doesn't work, yet from a shell-script, it does, I'd certainly
> appreciate knowing.

  Well, isn't it going to be because sh and zsh are different shells with
different syntax and commands and rules about quoting and escaping?

> echo "#!/bin/sh" > $LOG
> echo "#Starting TSReader at $DATE" >> $LOG
> echo "tsreader -1 -d -i -s tsreader_twinhan1030.dll $MUX \
> 	${DRIVE}:\\${FILENAME}-${DATE}.ts $LENGTH \
> 	$FREQ 0 $SYMB $LOFREQ 0" >> $LOG
> chmod 775 $LOG
> $LOG
> #tsreader -1 -d -i -s tsreader_twinhan1030.dll $MUX

  Hmmm.  Peculiar.  Both bash (which is what you get for sh under cygwin) and
zsh understand the -x option, which prints out each line of script as you
execute it.  Try modifying the first line to each of "#!/usr/bin/zsh -x" and
#!/usr/bin/sh -x" and running it that way; it should let you see what actual
args are getting passed to tsreader.

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]