我有一個文件abc.txt,我想從bash腳本中刪除文件中的特定部分。如何使用bash腳本從文件中刪除特定部分
#######################Media######################
[Media]
comment = Media Files
path = /share22
browseable = yes
read only = yes
guest only = no
#######################end#######################
#######################Add#######################
[Add]
comment = Media Files
path = /share33
browseable = yes
read only = yes
guest only = no
#######################end#######################
#######################Added#####################
[Added]
comment = Media Files
path = /share44
browseable = yes
read only = yes
guest only = no
#######################end#######################
和從文件
#######################Add#######################
[Add]
comment = Media Files
path = /share33
browseable = yes
read only = yes
guest only = no
#######################end#######################
除去下面部分I如何刪除的第一部分,第二部分或最後部分?
請幫助我!
由文本替換圖像。用四個空格前綴代碼/數據。請看[編輯幫助](http://stackoverflow.com/editing-help)。 – Cyrus
請閱讀http://stackoverflow.com/help/how-to-ask,http://stackoverflow.com/help/dont-ask,http://stackoverflow.com/help/mcve並參加[tour] (http://stackoverflow.com/tour),然後再發布更多Q值。祝你好運。 – shellter