From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeroen Hofstee Date: Tue, 19 Jul 2011 23:28:07 +0200 Subject: [U-Boot] [PATCH 2/3] mkconfig: create CONFIG_ defines without relying on GNU extensions In-Reply-To: References: <1311108110-37409-1-git-send-email-jeroen@myspectrum.nl> <1311108110-37409-3-git-send-email-jeroen@myspectrum.nl> Message-ID: <4E25F6E7.5080907@myspectrum.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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