Greg Morgan wrote:
Charles Steinkuehler wrote:

- There are a *LOT* of variable assignments of the form:

VAR=sed 's/.*LRP=/\1/; s/ .*//1' /proc/cmdline`

I didn't realize that these were slow. I think the original author was Mister sed not that it was a bad thing.

The sed version requires launching another process for sed to run in, and recording it's output. Not that it's that slow or that hard on resources, but it's slower than using commands that are already 'built-in' to the shell, and can run in the current process context.


The various forms of ${} substitution that exist in both ash and bash are very powerful, and can do most string manipulations if used in the right combination (see weblet for an example of lots of fancy tricks with shell paramter expansion :).

--
Charles Steinkuehler
[EMAIL PROTECTED]



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

_______________________________________________
leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to