Clint Adams <[EMAIL PROTECTED]> writes:

>> That's not quite right:
>> 
>> % echo ${(os:,:)${${${"$(dchroot -l)"#Available chroots:}/\[*\]/}//[
>> ]/}}
>> experimental  fake  sarge   sid-file  sid-file-source  sid-snap  
>> sid-snap-source  testsnap  testsnap-source
>> hardknott% dchroot -l
>> Available chroots: experimental, fake, sarge [stable, sarge-backports], sid 
>> [unstable, unstable-sbuild], sid-block [sid-block], sid-file, 
>> sid-file-source, sid-snap, sid-snap-source, testsnap, testsnap-source
>> 
>> The output should be:
>> experimental fake sarge stable sarge-backports sid unstable unstable-sbuild 
>> sid-block sid-file sid-file-source sid-snap sid-snap-source testsnap 
>> testsnap-source
>> 
>> i.e. the contents of the square brackets should not be eliminated.
>
> How about ${(os:,:)${${${"$(cat /tmp/vakka)"#Available chroots: }// 
> /}//[[\]]/,}}

That seems fine, except for the fact that "Available chroots" is
translated, so everything up to and including the ':' needs removing.


-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: pgpdvoVi8OrND.pgp
Description: PGP signature

Reply via email to