In function jcd, use printf insted of simple echo.