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
- Next message: Chris F.A. Johnson: "Re: any shell that doesn't expand \t or \n in it's arguments?"
- Previous message: Richard Howlett: "Re: Divide a line making two lines"
- In reply to: jwk: "Re: any shell that doesn't expand \t or \n in it's arguments?"
- Next in thread: jwk: "Re: any shell that doesn't expand \t or \n in it's arguments?"
- Reply: jwk: "Re: any shell that doesn't expand \t or \n in it's arguments?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 ***
- Next message: Chris F.A. Johnson: "Re: any shell that doesn't expand \t or \n in it's arguments?"
- Previous message: Richard Howlett: "Re: Divide a line making two lines"
- In reply to: jwk: "Re: any shell that doesn't expand \t or \n in it's arguments?"
- Next in thread: jwk: "Re: any shell that doesn't expand \t or \n in it's arguments?"
- Reply: jwk: "Re: any shell that doesn't expand \t or \n in it's arguments?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]