0
匹配特定條件的接合線我需要一個命令,如果將加入行:
-following符合多於5個空格開始
-length接合線將不大於79個字符
-those線不是如上
-same與模式1和模式2線之間,但與另一組的模式,如pattern3和pattern4即在bash
它會在這樣一個文件的工作:
Long line that contains too much text for combining it with following one That line cannot be attached to the previous becouse of the length This one also becouse it doesn't start with spaces This one could be expanded pattern1 here are lines that shouldn't be changed pattern2 Another line to grow
運行命令後,輸出應該是:
Long line that contains too much text for combining it with following one That line cannot be attached to the previous becouse of the length This one also becouse that one doesn't start with spaces This one could be expanded pattern1 here are lines that shouldn't be changed pattern2 Another line to grow
它不能移動線的一部分。
我使用bash 2.05 SED 3.02 AWK 3.1.1和grep 2.5.1,我不知道如何解決這個問題:)