TEST: Improve portability of shell script