[MPlayer-advusers] Error with dash shell

Corey Hickey bugfood-ml at fatooh.org
Wed Aug 16 07:32:36 CEST 2006


Diego Biurrun wrote:
> Please don't top-post.
> 
> On Tue, Aug 15, 2006 at 07:49:41PM -0400, Brice wrote:
>> Yes, with this change it works.
> 
> Well, then find out why dash chokes on this simple shell script.  Most
> shells grok it perfectly fine and I don't see any bashisms in it.

This looks to be the same as the dash-related bug reported on
ffmpeg-devel on 2006-08-14. Dash echo interprets '\' as an escape such
that "\n" becomes a real newline, "\t" becomes a tab, etc.

The attached patch changes help_diff.sh to use printf instead of echo,
which might be the most appropriate fix. The following three commands
produce identical output for me.

(before modifying)
bash ./help_diff.sh help_mp-fr.h < help_mp-en.h

(after modifying)
bash ./help_diff.sh help_mp-fr.h < help_mp-en.h
dash ./help_diff.sh help_mp-fr.h < help_mp-en.h

Diego, if you think that's the right approach, say so and I'll test more
thoroughly and propose the patch on -dev-eng. ...or just apply it
yourself and drink the potential cola. :)

-Corey
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: help_diff_printf.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-advusers/attachments/20060815/08408941/attachment.txt>


More information about the MPlayer-advusers mailing list