lhunath 1309940560 learn When bash creates a subshell or executes an external command, it needs to fork. Avoid forking unless you have a good reason to: solutions that fork are often slower, even more so on machines where forking is expensive (eg. ''[[ $n = *[^0-9]* ]]'' is 300 times faster than ''echo "$n" | grep -q -v "[^0-9]"''). ghj 1343467934 forget ghj 1343468054 learn When bash creates a subshell or executes an external command, it needs to fork. Avoid forking unless you have a good reason to: solutions that fork are often slower, even more so on machines where forking is expensive (eg. ''[[ $n != *[![:digit:]]* ]]'' is 300 times faster than ''echo "$n" | grep -q -v "[^[:digit:]]"''). ghj 1343468118 forget ghj 1343468216 learn When bash creates a subshell or executes an external command, it needs to fork. Avoid forking unless you have a good reason to: solutions that fork are often slower, even more so on machines where forking is expensive (eg. ''[[ $ext = *.txt ]]'' is much faster than ''echo "$foo" | grep -q "\.txt$"'').