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

Re: Possible ZSH bug with IO direction



On Sat, 23 Apr 2016 15:14:36 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Apr 24,  4:30am, Roger Qiu wrote:
> }
> }  > gm convert -compress JPEG - - < input.jpg > output.jpg
> } gm convert: Corrupt JPEG data: 873 extraneous bytes before marker 0xd9 
> } (/tmp/gmo1fx92).
> 
> I suspect you are encountering the issue that "gm" wants input.jpg in
> binary mode, but zsh's input redirection operator has forced it to text
> mode.  A lengthy comment in Src/main.c (copypasted below) explains this.  

Mounting the filesystem within Cygwin as binary works here.  Typically
that's the right thing to do if you're dealing with Unix-y type files,
but if you want reasonably transparent handling of Windows text files
it's not the right thing to do.

pws



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