print output in a single line unix code example
Example: bash print output to one line
# Basic syntax:
<command_producing_multi-line output> | tr '\n' ' '
# Where:
# - | sends (pipes) the multi-line output of your command to tr
# - tr '\n' ' ' translates all new line characters from the multi-line
# output to spaces, resulting in all output on a single line.
# Note, change ' ' to whatever delimiter you want between the lines now
# displayed on a single line (e.g. ',' or ';' or '|')