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

From: jwk (_hate_spam_thunder7_at_xs4all.nl)
Date: 03/31/04


Date: 31 Mar 2004 16:40:57 GMT

From: Barry Margolin <barmar@alum.mit.edu>
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:
>
>> host=`echo $1 | cut -d"\\" -f1`
>
> Or use printf:
>
> host=$(printf '%s' "$1" | cut -d'\\' -f1)
>
That solved it. Thanks,

Jurriaan

-- 
If it wasn't for C, we would be using BASI, PASAL and OBOL!
Debian (Unstable) GNU/Linux 2.6.5-rc2-mm5 2x5947 bogomips 0.34 0.28


Relevant Pages