Closed Kriechi closed 10 years ago
[]
is also builtin. I'd prefer to stick with it (the noticeable performance penalty is starting ruby).Not sure if the []
vs [[]]
thing changed with some version of bash, but I used to think that it triggers running the test executable - creating some kind of overhead. Therefore I always use the bash syntax - with double brackets. http://unix.stackexchange.com/a/32211
The newline thing was inconsistent so I choose one and normalised it. So no newline changes at all? I will split the changes into 3 commits - so you can cherry-pick what you want.
@ysbaddaden splitted - actually 4 commits. I you the things you want don't merge - let me know, then I reorder them appropriately.
Awesome! I cherry-picked 66580c8 and f2b2ef7 and fixed the one occurence of set -e
that was after a newline.
AFAIK []
used to call test
but shells eventually made it builtin for performance reasons, just like [[]]
which comes with some differences. At least that's what I understood (I may be wrong).
[[ ... ]]
because they are a builtin function, instead of starting a separatetest
processcd
,rm
, ...