一江春水向東流

          做一個有思想的人,期待與每一位熱愛思考的人交流,您的關注是對我最大的支持。

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            44 隨筆 :: 139 文章 :: 81 評論 :: 0 Trackbacks
          kill -9 pid &> /dev/null?????????? 屏蔽標準輸出和標準錯誤輸出

          [root@localhost shell]# echo $BASH_VERSION
          2.05b.0(1)-release
          [root@localhost shell]# echo $PATH
          /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/huyi/bin
          [root@localhost shell]# $PATH=$HOME:/usr/bin
          bash: /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/huyi/bin=/root:/usr/bin: ????
          [root@localhost shell]#
          [root@localhost shell]# export PATH
          [root@localhost shell]# hash
          hits??? command
          ?? 1??? /bin/egrep
          ?? 1??? /bin/bash
          ?? 1??? /bin/cat
          ?? 1??? /bin/cp
          ?? 1??? /bin/stty
          ? 15??? /bin/ls
          [root@localhost shell]# $!

          [root@localhost shell]# echo ${newfruit:-apple}
          apple
          [root@localhost shell]# echo ${fruit:-peach}
          orange

          [root@localhost shell]# food=grapes
          [root@localhost shell]# echo ${food:+pears}
          pears
          [root@localhost shell]# echo $food
          grapes

          posted on 2008-03-25 23:09 allic 閱讀(264) 評論(0)  編輯  收藏 所屬分類: LINUX配置,shell
          主站蜘蛛池模板: 汾西县| 崇文区| 西平县| 胶州市| 将乐县| 介休市| 秀山| 长海县| 濮阳市| 旬阳县| 耿马| 青冈县| 泊头市| 肃南| 精河县| 汶川县| 怀集县| 汤阴县| 涟水县| 忻州市| 共和县| 博白县| 辽阳市| 华池县| 东乡县| 凉城县| 子洲县| 松江区| 江孜县| 逊克县| 治县。| 武川县| 濮阳县| 台江县| 巨鹿县| 霍邱县| 龙泉市| 湖南省| 威远县| 道孚县| 阳东县|