📜  bash 打印输出到一行 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:09.191000             🧑  作者: Mango

代码示例1
# Basic syntax:
 | 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 '|')