[PATCH] make it possible to keep Config/Kbuild snippets in *.c files

walter harms wharms at bfs.de
Sat May 15 08:21:07 UTC 2010



Cristian Ionescu-Idbohrn schrieb:
> On Fri, 14 May 2010, Rob Landley wrote:
> 
>> To get this technique to stop modifying the data going through it, you
>> have to export IFS="$(echo -e "\n")" to get it to stop trimming leading
>> spaces,
> 
> Please don't do that.  It's not portable.  With dash being the default
> shell on ubuntu, on the way to become the default shell on debian too,
> followed soonish by all other debian derivatives and probably other
> distributions, you'll get a broken IFS.  Like:
> 
> 00000000  2d 65 20                                          |-e |
> 
> If resetting IFS is important, please do it like this instead:
> 
> IFS='
> '
> 
> You'll get what you want:
> 
> 00000000  0a                                                |.|
> 
> without breaking anything.
> 

That will make it unreadable due to invisible chars. what is about:
IFS=$( printf "\n" )

printf is posix and should be supported by dash.

re,
 wh





More information about the busybox mailing list