<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Chan Chen Coding...

    Use Sed in Multi-Files Text Processing

    During the software development, developers always need to modify multi code files since some bugs or requirement change. All of this modification may be similar, such as and insert the following code into JavaScript(<script> /*JavaScript Section*/</scripte>) section in JSP page, let us say we have A.jsp, B.jsp, and C.jsp. 
    function insertMe(){
        alert(“Hello”);
    }
    To complete this task, normally, we can open all three jsp file one by one, and copy + paste the function insertMe() into code. But if we have more files, it is boring and annoy to open echo file and insert the code.
    There is other smarter way to achieve this task, sed utility in Linux. In Linux, the sed provides the developer an convinces way. Just one command:
    sed –i ‘/<script>/ a\function insertMe(){\talert(“Hello”);\n}\n ‘ [ABC].jsp
    This script means: append function insertMe(){…} after <script> in A.jsp, B.jsp and C.jsp.
    Sed also provide other powerful feature, for more, please dive into ‘man sed’. Below is an example of replace.
    sed –e ‘s/Hello/Hello World‘ [ABC].jsp
    This script means replace all Hello with Hello World in A.jsp, B.jsp, and C.jsp.
    Because sed is a line oriented program.



    -----------------------------------------------------
    Silence, the way to avoid many problems;
    Smile, the way to solve many problems;

    posted on 2012-02-18 15:49 Chan Chen 閱讀(237) 評論(0)  編輯  收藏 所屬分類: Linux

    主站蜘蛛池模板: 一个人免费视频在线观看www| 精品一区二区三区免费毛片| a毛片免费观看完整| 亚洲AⅤ无码一区二区三区在线| 中文无码亚洲精品字幕| 在线观看免费人成视频| 亚洲人成片在线观看| 国产无人区码卡二卡三卡免费| 亚洲免费在线观看视频| 无码精品A∨在线观看免费| 亚洲AV无码成人专区| 成年美女黄网站色大免费视频| 亚洲日韩国产一区二区三区在线 | 2022中文字字幕久亚洲| 一区二区三区免费看| 亚洲人成色7777在线观看| 久久免费视频99| 亚洲国产美女福利直播秀一区二区 | 午夜免费福利片观看| 亚洲电影在线播放| 皇色在线视频免费网站| 校园亚洲春色另类小说合集| 免费在线观看一级毛片| 国产高清视频免费在线观看| 亚洲va无码va在线va天堂| 国产精彩免费视频| 男人的天堂av亚洲一区2区| 亚洲色爱图小说专区| 最近高清中文字幕免费| 亚洲国产精品99久久久久久| 亚洲人成无码www久久久| 久草福利资源网站免费| 亚洲国产高清国产拍精品| 国产日产亚洲系列最新| 97在线观看永久免费视频| 在线观看亚洲电影| 亚洲Aⅴ无码专区在线观看q| 大地资源二在线观看免费高清| 日韩成人毛片高清视频免费看| 亚洲综合精品一二三区在线 | a毛片免费观看完整|