From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1014 invoked from network); 16 May 2004 22:41:22 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?LSQPO1rGlkDpbd40oyLZfixPPpKu6jdM?@203.24.36.3) by ns1.primenet.com.au with SMTP; 16 May 2004 22:41:22 -0000 Received: (qmail 14916 invoked from network); 16 May 2004 22:06:14 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by proxy.melb.primenet.com.au with SMTP; 16 May 2004 22:06:14 -0000 Received: (qmail 3822 invoked from network); 16 May 2004 22:03:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 May 2004 22:03:38 -0000 Received: (qmail 28295 invoked by alias); 16 May 2004 22:03:26 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7459 Received: (qmail 28267 invoked from network); 16 May 2004 22:03:25 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 16 May 2004 22:03:22 -0000 Received: (qmail 2311 invoked from network); 16 May 2004 22:02:58 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO binome.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 16 May 2004 22:02:55 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id 57572B27E; Sun, 16 May 2004 15:02:53 -0700 (PDT) Date: Sun, 16 May 2004 15:02:53 -0700 From: Wayne Davison To: "S. Cowles" Cc: zsh-users@sunsite.dk Subject: Re: parameter type differences? Message-ID: <20040516220253.GA3264@blorf.net> References: <20040514102510.GF10581@greux.loria.fr> <200405161434.14167.scowles@earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405161434.14167.scowles@earthlink.net> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 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..