如果使用 Set -A column $(echo $line|tr '|' ' '|tr -s ' ')
那么得到的是:
Header
this
is
the
content
END
但是我想要得到的是:
Header
this is the content
END
请问一下有什么办法吗? 谢谢~
...全文
883打赏收藏
ksh 分割记录到数组 包含空格
在文件中,有一行记录类似于: Header|this is the content|END 如果使用 Set -A column $(echo $line|tr '|' ' '|tr -s ' ') 那么得到的是: Header this is the content END 但是我想要得到的是: Header this is the content END 请问一下有什么办法吗? 谢谢~