On Wed, Apr 03, 2024 at 12:50:50AM +0200, Paul D wrote: > On 2024-04-02 23:00, Elliott Mitchell wrote: > > Second, appears the ${parameter:offset:length} may not be POSIX. I > > dislike this, but do not object since OpenWRT's shell is built with this > > functionality enabled. > > > UUOC! Ha. Yes, there are a few non POSIXy things in openwrt ash. A number of > other scripts already take advantage of them so it's OK, if it avoids several > external calls to e.g. cut or td. >
Yes, which is why even though I disliked it, I wouldn't be able to reject merely for that. > How about POSIX native array IFS split? > > > IFS=' ' set -- $(hexdump -vn 5 -e '5/1 "%02x "' /dev/urandom) > > uci -q batch <<-EOF >/dev/null > set network.globals.ula_prefix=fd$1:$2$3:$4$5::/48 > commit network > EOF That is certainly better than the solution I came up with. More importantly, it addresses concern #1. Now just need a better commit message and hopefully the committers would find it acceptable. -- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | ehem+sig...@m5p.com PGP 87145445 | ) / \_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel