[ipxe-devel] add support for trimming whitespaces from strings

Michael Brown mbrown at fensystems.co.uk
Fri Dec 6 18:28:30 UTC 2013


On 29/11/13 11:16, Christian Hesse wrote:
> some vendors like filling information in BIOS with blanks. So echoing the
> product variable results in something like "Latitude E6500               ".
>
> I would like to trim the trailing whitespaces. This is not possible yet, no?

You can exploit the fact that the shell argument parser will 
automatically strip whitespace.  For example:

   # Filter out leading, trailing, and intermediate whitespace from 
${product}:
   set product ${product}

Michael



More information about the ipxe-devel mailing list