Re: any shell that doesn't expand \t or \n in it's arguments?

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 03/30/04


Date: Tue, 30 Mar 2004 14:19:16 -0500

In article <slrnc6jce5.2pe._hate_spam_thunder7@middle.of.nowhere>,
 jwk <_hate_spam_thunder7@xs4all.nl> wrote:

> Aha - it's echo then. The faulty part is something like this:
>
> host=`echo $1 | cut -d"\\" -f1`
> queue=`echo $1 | cut -d"\\" -f2`
>
> Time to go play with bash and ${param:offset:length}.

Or use printf:

host=$(printf '%s' "$1" | cut -d'\\' -f1)

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***