Hi Mike, >> Won't work on FreeBSD since it can't quite early [afaik] (perhaps with a >> label, but gets rather ugly..) >> >> [jeroen@blue ~]$ echo configflag | sed -e '/=/{s/=/\t/;q}' -e 's/$/\t1/' >> sed: 1: "/=/{s/=/\t/;q} >> ": extra characters at the end of q command > i'm not sure you've diagnosed the problem correctly. the fact that > the output says "end of q command" indicates that FreeBSD does support > the "q" command (as required by POSIX). > I didn't apparently.. > perhaps the problem is that the ";" extension to separating commands > (which is not in POSIX afaics) does not work the same in FreeBSD's sed > as GNU's sed. i imagine if you stick a ";" after the "q" command > it'll work ... > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html > -mike Yes, the ; does work as expected, thanks!
[jeroen@blue ~]$ echo config | sed -e '/=/{s/=/ /;q;}' -e 's/$/ 1/' config 1 [jeroen@blue ~]$ echo config=2 | sed -e '/=/{s/=/ /;q;}' -e 's/$/ 1/' config 2 Shall change the patch accordingly tomorrow. Regards, Jeroen _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot