[U-Boot] [PATCH 2/3] mkconfig: create CONFIG_ defines without relying on GNU extensions
Jeroen Hofstee
dasuboot at myspectrum.nl
Tue Jul 19 23:28:07 CEST 2011
Hi Mike,
> maybe i havent read enough sed scripts, but i dont think ive seen "!"
I took this for irony, so I triple checked:
jeroen at green-ubuntu:~$ echo config | sed -e '/=/!s/$/=1/'
config=1
jeroen at green-ubuntu:~$ echo config=2 | sed -e '/=/!s/$/=1/'
config=2
> used before. how about this more straightforward replacement:
> sed -e '/=/{s/=/\t/;q}' -e 's/$/\t1/'
> -mike
Won't work on FreeBSD since it can't quite early [afaik] (perhaps with a
label, but gets rather ugly..)
[jeroen at blue ~]$ echo configflag | sed -e '/=/{s/=/\t/;q}' -e 's/$/\t1/'
sed: 1: "/=/{s/=/\t/;q}
": extra characters at the end of q command
Regards,
Jeroen
More information about the U-Boot
mailing list