乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      linux中shell變量$#,$@,$0,$1,$2的含義解釋

       wedone 2013-07-23

      摘抄自:ABS_GUIDE

      下載地址:http://www./LDP/abs/abs-guide.pdf

      linux中shell變量$#,$@,$0,$1,$2的含義解釋:
      變量說明:
      $$
      Shell本身的PID(ProcessID)
      $!
      Shell最后運(yùn)行的后臺(tái)Process的PID
      $?
      最后運(yùn)行的命令的結(jié)束代碼(返回值)
      $-
      使用Set命令設(shè)定的Flag一覽
      $*
      所有參數(shù)列表。如"$*"用「"」括起來的情況、以"$1 $2 … $n"的形式輸出所有參數(shù)。
      $@
      所有參數(shù)列表。如"$@"用「"」括起來的情況、以"$1" "$2" … "$n" 的形式輸出所有參數(shù)。
      $#
      添加到Shell的參數(shù)個(gè)數(shù)
      $0
      Shell本身的文件名
      $1~$n
      添加到Shell的各參數(shù)值。$1是第1參數(shù)、$2是第2參數(shù)…。

      示例:

      1 #!/bin/bash
      2 #
      3 printf "The complete list is %s\n" "$$"
      4 printf "The complete list is %s\n" "$!"
      5 printf "The complete list is %s\n" "$?"
      6 printf "The complete list is %s\n" "$*"
      7 printf "The complete list is %s\n" "$@"
      8 printf "The complete list is %s\n" "$#"
      9 printf "The complete list is %s\n" "$0"
      10 printf "The complete list is %s\n" "$1"
      11 printf "The complete list is %s\n" "$2

      結(jié)果:

      [Aric@localhost ~]$ bash params.sh 123456 QQ
      The complete list is 24249
      The complete list is
      The complete list is 0
      The complete list is 123456 QQ
      The complete list is 123456
      The complete list is QQ
      The complete list is 2
      The complete list is params.sh
      The complete list is 123456
      The complete list is QQ
      Have a nice day!!!

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多