zsh-users
 help / color / mirror / code / Atom feed
* Little problem while converting from bash (quoting/splitting?)
@ 2005-05-12  6:28 krasnal
       [not found] ` <krasnal@2-0.pl>
  2005-05-12 16:29 ` Bart Schaefer
  0 siblings, 2 replies; 7+ messages in thread
From: krasnal @ 2005-05-12  6:28 UTC (permalink / raw)
  To: zsh-users

Hello,

I'm right now moving to zsh from bash which supposed to be straightforward
but I've encountered one problem.  Here's the log:
krasnal@szuflandia ~
$ for f in $(cleartool lsvob -short | head -10); do case $f in *gli* ) echo $f
| xxd;; esac; done
0000000: 5c67 6c69 320d 0a                        \gli2..
krasnal@szuflandia ~
$ bash
krasnal@szuflandia ~
$ for f in $(cleartool lsvob -short | head -10); do case $f in *gli* ) echo $f
| xxd;; esac; done
0000000: 5c67 6c69 320a                           \gli2.

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.  This is
a bit problematic for me because I'm eventually using these values for output
and the \r chars screw it up.  I've already learned that by default echo
interprets \a,\b,... sequences which I also have so I have to either use -E
or set bsd_echo option but this one is a bit puzzle for me.  Is there an
option for this (I thought sh_word_split would be the right one but there's
no change).

How should I solve this?  I mean I know I can try to strip \r which would work
for both windows and unix version but isn't there a simpler/more elegant way?

Best regards
-- 
    ____   _  ___ 
   /  | \_/ |/ _ \   Andrzej Marek Ostruszka 
  / _ |     | (_) |       MPSC (Cracow)
 /_/ L|_|V|_|\___/  (GnuPG key ID: 0x3D9C498A)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-05-19 13:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-12  6:28 Little problem while converting from bash (quoting/splitting?) krasnal
     [not found] ` <krasnal@2-0.pl>
2005-05-12  9:39   ` Peter Stephenson
2005-05-15 13:35     ` krasnal
2005-05-12 16:29 ` Bart Schaefer
2005-05-15 13:48   ` krasnal
2005-05-15 18:48     ` Bart Schaefer
2005-05-19 13:17       ` krasnal

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).