Shell: write_line() uses format only if arguments have been given

This avoids to protect { and } when no format is necessary