Improved portability over others shells than BASH.

Signed-off-by: Victor Berger <victor.berger@polytechnique.org>