一江春水向東流

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

            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 閱讀(261) 評論(0)  編輯  收藏 所屬分類: LINUX配置,shell
          主站蜘蛛池模板: 广宁县| 滦南县| 南宫市| 穆棱市| 深泽县| 清镇市| 东城区| 南平市| 东明县| 霍州市| 安国市| 定襄县| 泾源县| 临沧市| 弋阳县| 固阳县| 贞丰县| 微山县| 乌拉特前旗| 堆龙德庆县| 平顶山市| 固阳县| 迭部县| 丰城市| 库尔勒市| 嘉定区| 靖州| 铜鼓县| 旺苍县| 买车| 黑龙江省| 陆川县| 铜梁县| 虹口区| 分宜县| 寻乌县| 建平县| 巨鹿县| 邯郸市| 墨脱县| 松潘县|