Timeline for [ vs [[ : which one to use in bash scripts?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 30, 2022 at 14:12 | comment | added | András Aszódi |
I am not sure it makes much sense to select between [ and [[ based on execution speed, considering that Bash is an interpreted language that shouldn't really be used for performance-critical applications anyway. YMMV of course, but consider the wisdom of "Preliminary optimization is the root of all evil" (D. Knuth.)
|
|
| Mar 7, 2013 at 14:46 | history | edited | H.-Dirk Schmitt | CC BY-SA 3.0 |
add performance notes
|
| Mar 7, 2013 at 13:56 | vote | accept | kjo | ||
| Mar 7, 2013 at 12:07 | comment | added | poige |
+= And the reason to not use it — it's slower then (again) built-in version [[.
|
|
| Mar 7, 2013 at 11:05 | history | answered | H.-Dirk Schmitt | CC BY-SA 3.0 |