0
您好每一個我提取從窗戶一個zip文件,將Linux 現在我用grep來查找文件變化路徑
grep -r "D:/Oracle" /u01/app/Middleware/*
輸出是Windows內部的路徑:
/u01/app/Middleware/wlserver_10.3/common/templates/scripts/wlst/basicWLSSDomain.py:addTemplate("D:/Oracle/Middleware/wlserver_10.3/common/templates/domains/sipserverdomain.jar")
/u01/app/Middleware/wlserver_10.3/common/templates/scripts/wlst/basicWLSSDomain.py:writeDomain('D:/Oracle/Middleware/user_projects/domains/basicWLSSDomain')
/u01/app/Middleware/wlserver_10.3/common/templates/scripts/wlst/basicWLSDomain.py:readTemplate("D:/Oracle/Middleware/wlserver_10.3/common/templates/domains/wls.jar")
/u01/app/Middleware/wlserver_10.3/common/templates/scripts/wlst/basicWLSDomain.py:writeDomain('D:/Oracle/Middleware/user_projects/domains/basicWLSDomain')
/u01/app/Middleware/wlserver_10.3/common/templates/scripts/wlst/geo1Domain.py:readTemplate("D:/Oracle/Middleware/wlserver_10.3/common/templates/domains/wls.jar")
/u01/app/Middleware/wlserver_10.3/common/templates/scripts/wlst/geo1Domain.py
我需要一個腳本或者一個方法來更改此路徑,比如修改新路徑
D:/Oracle/ to /u01/app/
和ofcourse改變\到/裏面所有的配置文件
可以說,該文件
/u01/app/Middleware/wlserver_10.3/common/templates/scripts/wlst/basicWLSSDomain.py
包含一些文本includine
("D:/Oracle/Middleware/wlserver_10.3/common/templates/domains/sipserverdomain.jar")
我wannt改變d:/甲骨文/ U01 /應用程序遞歸地在/ u01下的任何文件中
感謝您的重播...和問題修正 –
如何應用代碼sed的〜D:/ Oracle /〜/ u01/app /〜; s〜\〜〜/〜g'遞歸地替換/ u01下的所有文本文件? –
就像['find。 -exec sed's〜D:/ Oracle /〜/ u01/app /〜; s〜\\〜/〜g'{} \;'](http://www.unix.com/man-pages.php?section=0&os=Linux&query=find)... – anishsane