Quote:
Originally Posted by knc1
|
The linked page says that "[[" is a keyword, but "[" is a built-in command. To clarify: the kindles use busybox, and although /bin contains symlinks that point to busybox, it appears that they are only used if you launch a non-busybox shell. Busybox does NOT follow the search path for commands that it has built-in, even if symlinks are provided. Replacing /bin symlinks to point to different programs only works from within a different shell (like a "real" bash).
Quote:
Originally Posted by NiLuJe
Ah, thanks geekmaster, I indeed dimly remember starting using double brackets everywhere to save some forks
|
In the case of the kindles, using the "[[" keyword instead of the "[" implicit command may well save a process fork (another instance of busybox), but if busybox is already cached, either way should be reasonable fast (you are running interpreted scripting code after all...)
, but I think that there were OTHER benefits to using "[[" as I recall (enough to convince me to use the extra characters when I normally use the shortest commands to fit more on a line, but I do not remember the detals).