Use printf instead of echo for predictable formatting.
Section: Input Output and Pipelines
Print formatted output
bash
bash
printf 'user=%s id=%s
' "$USER" "$UID"Explanation
Preferred in scripts because format control is explicit.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Input Output and Pipelines