I am writing a diagnostics script currently using echo commands like

echo -e "Hostname:\t\t"`hostname`

which prints out Hostname: {hostname}

Would I be better served accomplishing this task using printf instead of echo -e? If so what would a potential string look like? I want to make sure to keep all of the output from my various commands justified for a cleaner look. I am new to using printf so any help would be appreciated.

Thanks in advance,



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.