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

Re: Little problem while converting from bash (quoting/splitting?)



On May 12,  9:28am, krasnal wrote:
}
} This is with 4.2.4 cygwin version of zsh and 2.05b.0(1)-release of bash.
} cleartool is windows program producing \r\n line terminated output.  Note
} that zsh has both \r and \n in f variable while bash has only \n.

Bash apparently reads stdin/stdout pipes in text mode, whereas zsh does so
in binary mode.  It's somewhat reasonable to assume pipes are text in a
shell context, but because zsh has so many ways to manipulate parameters,
I seem to recall a there was a conscious decision made to use text mode as
little as possible; in effect, it's used only when reading from files.

Which suggests a possible workaround; I don't have a cygwin zsh handy to
try it:

    for f in $(<=(cleartool lsvob -short | head -10)); do ...



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