[script] replace echo with printf for portability