-1
我有一個文件鬃fil1.txt,以及文件的內容是: -提取shell腳本一個特定的字符串
./pub/index.html ./manifest.bak
./manifest.rel ./ns/GSCT_ASNShipmentInfo_E1/node.idf
./ns/GSCT_ASNShipmentInfo_E1/E1/svcReprocessASNManifest/flow.xml.bak
./ns/GSCT_ASNShipmentInfo_E1/E1/svcReprocessASNManifest/node.ndf
./ns/GSCT_ASNShipmentInfo_E1/E1/svcReprocessASNManifest/flow.xml
./ns/GSCT_ASNShipmentInfo_E1/E1/svcUpdateVR01ForOP/flow.xml.bak
./ns/GSCT_ASNShipmentInfo_E1/E1/svcUpdateVR01ForOP/node.ndf
./ns/GSCT_ASNShipmentInfo_E1/E1/svcUpdateVR01ForOP/flow.xml
我想提取所有我在有flow.xml線結束並將其保存到不同的文件。 輸出文件應該是: -
./ns/GSCT_ASNShipmentInfo_E1/E1/svcReprocessASNManifest/flow.xml
./ns/GSCT_ASNShipmentInfo_E1/E1/svcUpdateVR01ForOP/flow.xml
我認爲你應該逃避你模式中的'.'字符。現在它將匹配以'flowaxml','flowbxml'等結尾的字符串。 – Jojo
不夠公平,只是更新。謝謝!! – fedorqui