From: "Henning Sprang" Subject: Re: [Xen-users] xendomains problem with long domain names? Date: Wed, 3 Jan 2007 15:46:43 +0100 Message-ID: <5bb00b3f0701030646o7c5ad8edi7de85c03e37c79f5@mail.gmail.com> References: <5bb00b3f0701030554xc819e4bxd5013ed5f3d759b7@mail.gmail.com> <20070103140243.GD3067@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070103140243.GD3067@redhat.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Daniel P. Berrange" Cc: Xen devel list , "xen-users@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 1/3/07, Daniel P. Berrange wrote: > [...] > which is used to parse the output of 'xm list'. The 'cut -c0-17' bit looks > like the obvious problem - truncating the name at 17 characters :-( Yeah, thanks - I also just found that (couldn't resist looking it up even if busy with other things) - is there any good reason why this is made like it is? Otherwise I'd propose the parseln function be changed to this: parseln() { #name=`echo "$1" | cut -c0-17` name=`echo "$1" | cut -d " " -f 1` name=${name%% *} #rest=`echo "$1" | cut -c18- ` rest=`echo "$1" | cut -d " " -f 2-` read id mem cpu vcpu state tm < <(echo "$rest") } That seems to make it work fine here. Henning (copy to the devel list - or do you prefer another way to receive patches?)