Refactored scripts to use printf instead of echo.