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

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

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

    gembin

    OSGi, Eclipse Equinox, ECF, Virgo, Gemini, Apache Felix, Karaf, Aires, Camel, Eclipse RCP

    HBase, Hadoop, ZooKeeper, Cassandra

    Flex4, AS3, Swiz framework, GraniteDS, BlazeDS etc.

    There is nothing that software can't fix. Unfortunately, there is also nothing that software can't completely fuck up. That gap is called talent.

    About Me

     

    Get substring of a string under UNIX/Linux

    there many ways to do so.


    str="hello world"

    1) cut
    Where -cN-M tells the cut command to return columns N to M, inclusive. 
    cut -cN-M

    start=1
    end=5
    sub_str=`echo ${str} | cut -c${start}-${end}`
    output: hello

    2) bash 
    Note: if you are not sure of having bash, consider using cut. 
    ${str:offset}
    $
    {str:offset:length}

    sub_str=${str:0:5}
    output: hello

    3) expr

    expr substr string position length 
    sub_str=`expr substr $str 1 5`
    output: hello

     

    posted on 2012-04-01 15:38 gembin 閱讀(807) 評(píng)論(0)  編輯  收藏 所屬分類: Linux

    導(dǎo)航

    統(tǒng)計(jì)

    常用鏈接

    留言簿(6)

    隨筆分類(440)

    隨筆檔案(378)

    文章檔案(6)

    新聞檔案(1)

    相冊(cè)

    收藏夾(9)

    Adobe

    Android

    AS3

    Blog-Links

    Build

    Design Pattern

    Eclipse

    Favorite Links

    Flickr

    Game Dev

    HBase

    Identity Management

    IT resources

    JEE

    Language

    OpenID

    OSGi

    SOA

    Version Control

    最新隨筆

    搜索

    積分與排名

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    free counters
    主站蜘蛛池模板: 无码av免费一区二区三区| 久久精品免费大片国产大片| 18pao国产成视频永久免费| 亚洲人精品午夜射精日韩| 污污的视频在线免费观看| 免费国产综合视频在线看 | 亚洲狠狠ady亚洲精品大秀| 一区二区三区观看免费中文视频在线播放| 亚洲自偷自偷偷色无码中文| 成人免费ā片在线观看| 亚洲精品无码鲁网中文电影| 182tv免费视频在线观看| 91亚洲国产成人精品下载| 亚欧免费视频一区二区三区| 亚洲欧洲另类春色校园网站| 成人毛片18女人毛片免费96| 亚洲AV无码一区二区三区性色| 免费在线观看黄网| 亚洲精品国产日韩无码AV永久免费网| 亚洲一级片内射网站在线观看| 中文字幕一区二区免费| 亚洲成年轻人电影网站www| 69式互添免费视频| 亚洲乱妇熟女爽到高潮的片| 免费a级黄色毛片| 国产自国产自愉自愉免费24区 | 亚洲自偷精品视频自拍| 无遮免费网站在线入口| 男人的天堂av亚洲一区2区| 亚洲性久久久影院| 91精品免费久久久久久久久| 亚洲欧美日韩国产精品一区| 波多野结衣中文一区二区免费| 成在线人视频免费视频| 亚洲最大的视频网站| 国产18禁黄网站免费观看| 中文字幕不卡免费高清视频| 亚洲乱码卡三乱码新区| 国产偷窥女洗浴在线观看亚洲| 成人免费在线看片| h片在线播放免费高清|