>> it is always a bad idea to mix up different languages
>> in one environment.

I don't accept this is a valid starting point.  I agree that it is
useful to limit the number of tools/languages you use, but you should
still try and use the right tool/language for the right job.

>> now we use ash-builtins to get
>> uptime_in_seconds() instead of using cryptic sed-style.
> All those "restyle" to avoid the use of awk and sed are really useful?
> I don't believe.
> The use of sed an awk should not be consider "a different" languages
> simple because aren't different languages but just tools like read or
> cut.

Indeed: /bin/sh was designed around the idea that running an external
command like `sed' is basically equivalent to a function call to
a library function.  That's why /bin/sh is very limited in the
text-handling functionality it provides directly.  So by and large,
`sed' is part of the /bin/sh language (I've managed to survive 20 years
of unix without ever really learning awk, so I don't feel quite as
strongly about awk as about sed).


        Stefan

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to