[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Busybox build problem
From:       Dick Streefland <dick () streefland ! net>
Date:       2007-02-23 23:00:31
Message-ID: 20070223230031.GA23727 () streefland ! xs4all ! nl
[Download RAW message or body]

On Friday 2007-02-02 23:14, Brion Finlay wrote:
| Alternatively, since awk is being invoked anyway, this line could be changed
| to just a single line awk invocation to do away with the sed, the grep, and
| the echo:
| 
| awk '/^#? ?CONFIG_/ {gsub(/\"/,"\\\\\"",$0); print "\"" $0 "\\n\"";}'
| $config
| 
| I tested this change under bash and dash and it also works in both shells.

I just ran into this dash/bash problem and (before I found this
discussion) worked around it by replacing the whole line by a single
sed invocation:

sed '/^#\? \?CONFIG/!d; s/"/\\"/g; s/.*/"&\\n"/' $config

-- 
Dick
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic