delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/26/16:40:01

X-Spam-Check-By: sourceware.org
Date: Fri, 26 May 2006 13:37:51 -0700 (PDT)
From: "Peter A. Castro" <doctor AT fruitbat DOT org>
To: Cygwin List <cygwin AT cygwin DOT com>
Subject: RE: sh script works, zsh script doesn't
In-Reply-To: <005401c680a8$c92a6e20$a501a8c0@CAM.ARTIMI.COM>
Message-ID: <Pine.LNX.4.63.0605261331270.2085@gremlin.fruitbat.org>
References: <005401c680a8$c92a6e20$a501a8c0 AT CAM DOT ARTIMI DOT COM>
MIME-Version: 1.0
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

On Fri, 26 May 2006, Dave Korn wrote:

> 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?

I doubt that's it, because zsh strives to be fully sh compatable (as well
as ksh and mostly bash-ish).  No, the real problem is likely something
else.

Vidiot doesn't really state how zsh fails, so I'd really like more
details as to what he's seeing.

>> 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
>> ${DRIVE}:\\${FILENAME}-${DATE}.ts $LENGTH $FREQ 0 $SYMB $LOFREQ 0
>
>  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.
>
>    cheers,
>      DaveK

-- 
Peter A. Castro <doctor AT fruitbat DOT org> or <Peter DOT Castro AT oracle DOT com>
 	"Cats are just autistic Dogs" -- Dr. Tony Attwood

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019