1
cat this_file | sed ':a;N;$!ba;s/\n[a-z]/ [a-z]/g' > that_file
示例文本:
However the text \n
looks like this when it replaces the newline.\n
輸出:
However the text [a-z]ooks like this when it replaces the newline.\n
這是什麼叫什麼?任何建議,我做錯了什麼?
優秀。謝謝我沒有意識到反向引用。像魅力一樣工作。 – jmunsch