zsh-users
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: "S. Cowles" <scowles@earthlink.net>
Cc: zsh-users@sunsite.dk
Subject: Re: parameter type differences?
Date: Sun, 16 May 2004 15:02:53 -0700	[thread overview]
Message-ID: <20040516220253.GA3264@blorf.net> (raw)
In-Reply-To: <200405161434.14167.scowles@earthlink.net>

On Sun, May 16, 2004 at 02:34:06PM -0700, S. Cowles wrote:
> The utility od is used to verify the values of the "bref" and "b"
> parameters.  

Except that you used echo to output the value of the variables, and it
interprets escape sequences by default.  If you change all the "echo -n"
calls to "echo -nE", it will show you how the values differ.  Here's the
output of such a modified script:

case 1.
diff
0000000 012
0000001
0000000 134 060 061 062
0000004
case 2.
diff
0000000 012
0000001
0000000 134 156
0000002
case 3.
same
0000000 012
0000001
0000000 012
0000001

To get rid of this discrepancy, put a $ in front of the string literals
you assign to $b, like this:

b=$'\012'

That will put a single character into $b instead of 4.

..wayne..


      reply	other threads:[~2004-05-16 22:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-14 10:25 Recursive globbing Vincent Lefevre
2004-05-14 10:54 ` Peter Stephenson
2004-05-14 16:10   ` Bart Schaefer
2004-05-14 16:22     ` Peter Stephenson
2004-05-14 16:35       ` Peter Stephenson
2004-05-17 15:06     ` Vincent Lefevre
2004-05-16 21:34 ` parameter type differences? S. Cowles
2004-05-16 22:02   ` Wayne Davison [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040516220253.GA3264@blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=scowles@earthlink.net \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).