On 20/01/11 10:06, Bastian Bittorf wrote: >>>> 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. > > your are right. the question is: > > original: > sed -ne 's![^0-9].*$!!p' /proc/uptime > > patch: > cut -d'.' -f1 /proc/uptime > > patch-2: > uptime_in_seconds() > { > cut -d'.' -f1 /proc/uptime > } > > what is the better tool? > what is better readable? > must we really sanitize /proc/uptime for numbers? > >> Indeed: /bin/sh was designed around the idea that running an >> external >> command like `sed' is basically equivalent to a function call to > > yes, but in practise it is a good idea to use internal > functions/commands (speed, memory). > >> a library function. That's why /bin/sh is very limited in the >> text-handling functionality it provides directly. So by and > > /bin/sh is more limited than sed, but still strong. > >> `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). > > i like this sentence 8-) > > I will stop sending patches like this, because i see that > many people have stomachache with these, but i propose > for menuconfig a selection like this: > > [ ] base-files standard > [ ] base-files mini (no sed/awk, experimental) > > bye, Bastian > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel >
Hey, maintaining 2 basefile packages is error prone and leads to having to maintain 2 packages. rather than 1 which is already maintained. your mails seem a bit like "drive-by-patching" and the question is, if you, in 1, 6, 12 months, still forward port all the changes and fixes done in base-files to base-files-mini ?! also basefile-mini does exactly the same as basefiles, just in a style you personally favour. normally a -mini means, that less features are included (see hostapd and hostapd-mini). so calling in basefile-shell_only would be more applicable, although the purpose of such a package is still not clear to me apart from satisfying personal style preferences. blogic _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel