婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > csh,tcsh,bash,sh等shell的區別

csh,tcsh,bash,sh等shell的區別

熱門標簽:如果做線上地圖標注 河南信譽好的不封卡電話外呼系統 江蘇云電銷機器人公司 客服外呼系統怎么樣 打電話機器人接我是他的秘書 揭陽智能電話機器人推薦 百度地圖標注錯了有責任嗎 地圖標注員都是年輕人 華鋒e路航港口地圖標注

出自bash的faq,仔細看看。順便翻譯學習一下。

復制代碼 代碼如下:

Section C: Differences from other Unix shells
C:跟其他UNIX shells腳本的區別
C1) How does bash differ from sh, the Bourne shell?
C1) bash和 sh、Bourne shell的區別
This is a non-comprehensive list of features that differentiate bash
from the SVR4.2 shell.  The bash manual page explains these more
completely.
這時一個不全面的bash和SVR4.2 shell特性區別的列表,bash手冊解釋的更詳細
Things bash has that sh does not:
bash特有的功能:
        long invocation options
        長選項的調用
        [+-]O invocation option
        -l invocation option
        `!' reserved word to invert pipeline return value
         !嘆號保留字對管道返回的值取反
        `time' reserved word to time pipelines and shell builtins
         time保留字測試管道或內建命令耗時情況
        the `function' reserved word
        the `select' compound command and reserved word
        select復合命令和保留字
        arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
        算術命令:for ((expr1 ; expr2; expr3 )); do list; done
        new $'...' and $"..." quoting
        新的引用方法$'...'  $"..."
        the $(...) form of command substitution
        $(...) 命令替代用法
        the $(filename) form of command substitution, equivalent to
                $(cat filename)
        $(filename)形式的命令的替換,相當于$(cat filename)
        the ${#param} parameter value length operator
        ${#param} 測試參數param的值的長度
        the ${!param} indirect parameter expansion operator
        ${!param} 間接參數擴展操作
        the ${!param*} prefix expansion operator
        ${!param*} 前綴擴展操作
        the ${param:offset[]} parameter substring operator
       ${param:ffset[]}參數通過偏移量截取子串操作
        the ${param/pat[/string]} parameter pattern substitution operator
        ${param/pat[/string]} 參數模式替換的操作
        expansions to perform substring removal (${p%[%]w}, ${p#[#]w})
         擴展子串刪除命令:(${p%[%]w}, ${p#[#]w})
        expansion of positional parameters beyond $9 with ${num}
        擴展了為止參數超過9的限制
        variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, REPLY,
                   TIMEFORMAT, PPID, PWD, OLDPWD, SHLVL, RANDOM, SECONDS,
                   LINENO, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE, HOSTNAME,
                   ENV, PS3, PS4, DIRSTACK, PIPESTATUS, HISTSIZE, HISTFILE,
                   HISTFILESIZE, HISTCONTROL, HISTIGNORE, GLOBIGNORE, GROUPS,
                   PROMPT_COMMAND, FCEDIT, FIGNORE, IGNOREEOF, INPUTRC,
                   SHELLOPTS, OPTERR, HOSTFILE, TMOUT, FUNCNAME, histchars,
                   auto_resume
        上邊一堆的環境變量
        DEBUG trap
        ERR trap
        調試和錯誤陷阱
        variable arrays with new compound assignment syntax
         數組和復合賦值運算符的語法規則
        redirections: >, >, >|, , [n]word-, [n]>word-
         重定向規則: >, >, >|, , [n]word-, [n]>word-
        prompt string special char translation and variable expansion
        提示字符串特殊字符的轉化和變量展開
        auto-export of variables in initial environment
        自動繼承初始化的環境變量
        command search finds functions before builtins
        命令搜查函數限于內建命令
        bash return builtin will exit a file sourced with `.'
        bash返回內建命令 將退出一個.文件源
        builtins: cd -/-L/-P, exec -l/-c/-a, echo -e/-E, hash -d/-l/-p/-t.
                  export -n/-f/-p/name=value, pwd -L/-P,
                  read -e/-p/-a/-t/-n/-d/-s/-u,
                  readonly -a/-f/name=value, trap -l, set +o,
                  set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
                  unset -f/-v, ulimit -m/-p/-u,
                  type -a/-p/-t/-f/-P, suspend -f, kill -n,
                  test -o optname/s1 == s2/s1 s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
        上邊一堆內建命令
        bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
        bash reads這樣寫交互腳本,環境變量非交互的。
        bash restricted shell mode is more extensive
        bash更廣泛的受限模式
        bash allows functions and variables with the same name
        允許函數名變量名一樣
        brace expansion
        括號擴展
        tilde expansion
        ~波浪號擴展
        arithmetic expansion with $((...)) and `let' builtin
        算術擴展:$((...)) 和let命令
        the `...' extended conditional command
        `...` 命令擴展
        process substitution
        進程替換
        aliases and alias/unalias builtins
        別名的內建命令
        local variables in functions and `local' builtin
        函數內本地變量
        readline and command-line editing with programmable completion
        讀取行和命令行可以編程完成
        command history and history/fc builtins
         查看歷史命令
        csh-like history expansion
        other new bash builtins: bind, command, compgen, complete, builtin,
                                 declare/typeset, dirs, enable, fc, help,
                                 history, logout, popd, pushd, disown, shopt,
                                 printf
         上邊一堆新的bash內建命令。
        exported functions
        filename generation when using output redirection (command >a*)
        重定向輸出文件名的生成
        POSIX.2-style globbing character classes
        POSIX.2-style globbing equivalence classes
        POSIX.2-style globbing collating symbols
        POSIX.2風格的通配符類、等價類、通配符號
        egrep-like extended pattern matching operators
        case-insensitive pattern matching and globbing
        不區分大小寫的模式匹配和通配符
        variable assignments preceding commands affect only that command,
                even for builtins and functions
        變量賦值前的命令只影響那個命令,包括內建命令和函數
        posix mode
        redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr,
                /dev/tcp/host/port, /dev/udp/host/port
        debugger support, including `caller' builtin and new variables
        調試支持,包括caller內建命令和新變量
        RETURN trap

 
Things sh has that bash does not:
下邊是sh有但是bash木有的
        uses variable SHACCT to do shell accounting
        includes `stop' builtin (bash can use alias stop='kill -s STOP')
        `newgrp' builtin
        turns on job control if called as `jsh'
        $TIMEOUT (like bash $TMOUT)
        `^' is a synonym for `|'
        new SVR4.2 sh builtins: mldmode, priv

Implementation differences:
執行情況的不同:
        redirection to/from compound commands causes sh to create a subshell
        bash does not allow unbalanced quotes; sh silently inserts them at EOF
        bash does not mess with signal 11
        sh sets (euid, egid) to (uid, gid) if -p not supplied and uid 100
        bash splits only the results of expansions on IFS, using POSIX.2
                field splitting rules; sh splits all words on IFS
        sh does not allow MAILCHECK to be unset (?)
        sh does not allow traps on SIGALRM or SIGCHLD
        bash allows multiple option arguments when invoked (e.g. -x -v);
                sh allows only a single option argument (`sh -x -v' attempts
                to open a file named `-v', and, on SunOS 4.1.4, dumps core.
                On Solaris 2.4 and earlier versions, sh goes into an infinite
                loop.)
        sh exits a script if any builtin fails; bash exits only if one of
                the POSIX.2 `special' builtins fails

下邊都和上邊比較雷同了。。。大致瀏覽吧。
C2) How does bash differ from the Korn shell, version ksh88?

Things bash has or uses that ksh88 does not:
        long invocation options
        [-+]O invocation option
        -l invocation option
        `!' reserved word
        arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
        arithmetic in largest machine-supported size (intmax_t)
        posix mode and posix conformance
        command hashing
        tilde expansion for assignment statements that look like $PATH
        process substitution with named pipes if /dev/fd is not available
        the ${!param} indirect parameter expansion operator
        the ${!param*} prefix expansion operator
        the ${param:offset[]} parameter substring operator
        the ${param/pat[/string]} parameter pattern substitution operator
        variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, SHLVL,
                   TIMEFORMAT, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE,
                   HISTFILESIZE, HISTIGNORE, HISTCONTROL, PROMPT_COMMAND,
                   IGNOREEOF, FIGNORE, INPUTRC, HOSTFILE, DIRSTACK,
                   PIPESTATUS, HOSTNAME, OPTERR, SHELLOPTS, GLOBIGNORE,
                   GROUPS, FUNCNAME, histchars, auto_resume
        prompt expansion with backslash escapes and command substitution
        redirection: > (stdout and stderr), , [n]word-, [n]>word-
        more extensive and extensible editing and programmable completion
        builtins: bind, builtin, command, declare, dirs, echo -e/-E, enable,
                  exec -l/-c/-a, fc -s, export -n/-f/-p, hash, help, history,
                  jobs -x/-r/-s, kill -s/-n/-l, local, logout, popd, pushd,
                  read -e/-p/-a/-t/-n/-d/-s, readonly -a/-n/-f/-p,
                  set -o braceexpand/-o histexpand/-o interactive-comments/
                  -o notify/-o physical/-o posix/-o hashall/-o onecmd/
                  -h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
                  typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt,
                  disown, printf, complete, compgen
        `!' csh-style history expansion
        POSIX.2-style globbing character classes
        POSIX.2-style globbing equivalence classes
        POSIX.2-style globbing collating symbols
        egrep-like extended pattern matching operators
        case-insensitive pattern matching and globbing
        `**' arithmetic operator to do exponentiation
        redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr
        arrays of unlimited size
        TMOUT is default timeout for `read' and `select'
        debugger support, including the `caller' builtin
        RETURN trap
        Timestamps in history entries
        {x..y} brace expansion

Things ksh88 has or uses that bash does not:
        tracked aliases (alias -t)
        variables: ERRNO, FPATH, EDITOR, VISUAL
        co-processes (|, >p, p)
        weirdly-scoped functions
        typeset +f to list all function names without definitions
        text of command history kept in a file, not memory
        builtins: alias -x, cd old new, newgrp, print,
                  read -p/-s/var?prompt, set -A/-o gmacs/
                  -o bgnice/-o markdirs/-o trackall/-o viraw/-s,
                  typeset -H/-L/-R/-Z/-A/-ft/-fu/-fx/-l/-u/-t, whence
        using environment to pass attributes of exported variables
        arithmetic evaluation done on arguments to some builtins
        reads .profile from $PWD when invoked as login shell

Implementation differences:
        ksh runs last command of a pipeline in parent shell context
        bash has brace expansion by default (ksh88 compile-time option)
        bash has fixed startup file for all interactive shells; ksh reads $ENV
        bash has exported functions
        bash command search finds functions before builtins
        bash waits for all commands in pipeline to exit before returning status
        emacs-mode editing has some slightly different key bindings

 
C3) Which new features in ksh-93 are not in bash, and which are?

New things in ksh-93 not in bash-3.0:
        associative arrays
        floating point arithmetic and variables
        math library functions
        ${!name[sub]} name of subscript for associative array
        `.' is allowed in variable names to create a hierarchical namespace
        more extensive compound assignment syntax
        discipline functions
        `sleep' and `getconf' builtins (bash has loadable versions)
        typeset -n and `nameref' variables
        KEYBD trap
        variables: .sh.edchar, .sh.edmode, .sh.edcol, .sh.edtext, .sh.version,
                   .sh.name, .sh.subscript, .sh.value, .sh.match, HISTEDIT
        backreferences in pattern matching (\N)
        `' operator in pattern lists for matching
        print -f (bash uses printf)
        `fc' has been renamed to `hist'
        `.' can execute shell functions
        exit statuses between 0 and 255
        `+=' variable assignment operator
        FPATH and PATH mixing
        getopts -a
        -I invocation option
        printf %H, %P, %T, %Z modifiers, output base for %d
        lexical scoping for local variables in `ksh' functions
        no scoping for local variables in `POSIX' functions

New things in ksh-93 present in bash-3.0:
        [n]word- and [n]>word- redirections (combination dup and close)
        for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
        ?:, ++, --, `expr1 , expr2' arithmetic operators
        expansions: ${!param}, ${param:offset[]}, ${param/pat[/str]},
                    ${!param*}
        compound array assignment
        the `!' reserved word
        loadable builtins -- but ksh uses `builtin' while bash uses `enable'
        `command', `builtin', `disown' builtins
        new $'...' and $"..." quoting
        FIGNORE (but bash uses GLOBIGNORE), HISTCMD
        set -o notify/-C
        changes to kill builtin
        read -A (bash uses read -a)
        read -t/-d
        trap -p
        exec -c/-a
        `.' restores the positional parameters when it completes
        POSIX.2 `test'
        umask -S
        unalias -a
        command and arithmetic substitution performed on PS1, PS4, and ENV
        command name completion
        ENV processed only for interactive shells
        set -o pipefail

您可能感興趣的文章:
  • bash shell命令行選項與修傳入參數處理
  • Bash Shell 注釋多行的幾種方法
  • 使用bash shell刪除目錄中的特定文件的3種方法
  • linux BASH shell下設置字體及背景顏色
  • Bash Shell字符串操作小結
  • Bash Shell中Shift用法分享
  • Shell 編程:Bash空格的那點事
  • 讓代碼整潔、過程清晰的BASH Shell編程技巧
  • Bash Shell中忽略大小寫的設置方法
  • shell(bash)下“time” 命令的輸出詳解

標簽:馬鞍山 金昌 許昌 婁底 赤峰 邵陽 巴彥淖爾 淘寶邀評

巨人網絡通訊聲明:本文標題《csh,tcsh,bash,sh等shell的區別》,本文關鍵詞  csh,tcsh,bash,等,shell,的,區別,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《csh,tcsh,bash,sh等shell的區別》相關的同類信息!
  • 本頁收集關于csh,tcsh,bash,sh等shell的區別的相關信息資訊供網民參考!
  • 推薦文章
    婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av
    亚洲国产精品久久久男人的天堂 | ㊣最新国产の精品bt伙计久久| 免费在线观看一区| 欧美精品123区| 日日夜夜一区二区| 欧美一卡二卡三卡四卡| 奇米色一区二区三区四区| 日韩三级.com| 国产精品91一区二区| 国产亚洲欧美激情| 成人妖精视频yjsp地址| 亚洲图片激情小说| 欧美综合亚洲图片综合区| 亚洲综合色成人| 欧美精品xxxxbbbb| 国产精品91一区二区| 国产精品另类一区| 在线免费观看不卡av| 日本三级亚洲精品| 国产日韩亚洲欧美综合| 91免费观看国产| 视频一区视频二区中文| 欧美精品一区二区蜜臀亚洲| 成人精品小蝌蚪| 一区二区国产盗摄色噜噜| 欧美精品丝袜中出| 国产激情偷乱视频一区二区三区| 中文字幕日韩精品一区| 欧美少妇一区二区| 国产在线精品免费av| 亚洲日本在线看| 欧美一区二区视频在线观看2020| 国产综合成人久久大片91| 亚洲免费在线电影| 欧美一区二区三区在线视频| 国产高清不卡二三区| 亚洲电影你懂得| 欧美国产在线观看| 欧美日韩一区二区三区免费看 | 亚洲一区二区三区四区的 | 国产一区二区视频在线| 国产精品欧美一级免费| 欧美人与禽zozo性伦| 成人精品视频一区二区三区尤物| 婷婷综合五月天| 国产精品国产三级国产普通话99 | 91精品一区二区三区久久久久久 | 另类欧美日韩国产在线| 亚洲视频一区二区免费在线观看| 日韩视频在线你懂得| 91在线观看一区二区| 久久精品理论片| 亚洲愉拍自拍另类高清精品| 久久亚洲欧美国产精品乐播| 欧美伊人久久久久久久久影院 | 国产成人精品亚洲日本在线桃色 | 精品国产乱码久久久久久影片| 一本到三区不卡视频| 黄页网站大全一区二区| 亚洲高清免费观看高清完整版在线观看| 久久先锋影音av| 91精品国产一区二区三区| 91麻豆自制传媒国产之光| 国产精品一区二区三区乱码| 日本vs亚洲vs韩国一区三区二区| 亚洲精品综合在线| 中文字幕一区二区不卡| 国产喷白浆一区二区三区| 日韩欧美www| 欧美精品第1页| 欧美日韩午夜在线| 91成人国产精品| 色综合久久精品| 不卡的电影网站| 成人精品视频.| 成人永久免费视频| 国产.精品.日韩.另类.中文.在线.播放 | 91麻豆国产自产在线观看| 风间由美性色一区二区三区| 国产在线播放一区| 精品夜夜嗨av一区二区三区| 日本成人超碰在线观看| 午夜欧美在线一二页| 午夜视频在线观看一区二区三区| 一区二区免费看| 亚洲午夜精品在线| 亚洲一级在线观看| 无吗不卡中文字幕| 日韩av一区二区在线影视| 日本欧美肥老太交大片| 精品一区二区三区蜜桃| 国产一区二区三区在线观看免费视频 | 国产一区二区三区久久久| 国产一区二区三区久久久| 国产成人免费9x9x人网站视频| 国产乱码精品1区2区3区| 国产福利精品一区| 成人a区在线观看| 在线观看亚洲成人| 欧美乱妇15p| 精品久久99ma| 国产精品久久久久久久久动漫 | 韩国av一区二区| 国产成人亚洲精品青草天美| 91在线你懂得| 欧美高清精品3d| 精品sm在线观看| 亚洲欧洲日产国产综合网| 一区二区国产盗摄色噜噜| 日本va欧美va瓶| 9l国产精品久久久久麻豆| 在线观看不卡视频| 久久日韩精品一区二区五区| 亚洲国产经典视频| 亚洲国产精品综合小说图片区| 蜜臂av日日欢夜夜爽一区| 国产a久久麻豆| 欧美无砖砖区免费| 26uuu亚洲综合色| 中文字幕在线观看一区| 午夜精品久久久久久久99樱桃| 国产在线麻豆精品观看| 99精品偷自拍| www欧美成人18+| 亚洲成人你懂的| 成熟亚洲日本毛茸茸凸凹| 欧美日韩高清在线| 国产精品免费aⅴ片在线观看| 午夜影视日本亚洲欧洲精品| 国产成人av影院| 宅男噜噜噜66一区二区66| 国产日韩v精品一区二区| 亚洲综合在线第一页| 国产成人av电影免费在线观看| 欧美天天综合网| 中文字幕制服丝袜一区二区三区| 日韩av中文在线观看| 色域天天综合网| 国产欧美1区2区3区| 日韩不卡免费视频| 欧美日韩在线亚洲一区蜜芽| 精品免费99久久| 午夜伦欧美伦电影理论片| 成人av免费在线播放| 日韩视频一区二区| 亚洲线精品一区二区三区| 成人一区在线观看| 久久精品日韩一区二区三区| 青青草一区二区三区| 在线观看www91| 一区二区三区欧美| 91免费在线看| 国产精品理伦片| 成人一区二区三区在线观看| 精品国产一二三| 免费在线观看精品| 欧美区在线观看| 亚洲成年人影院| 欧美日精品一区视频| 一区二区三区不卡视频在线观看 | 欧美亚洲动漫精品| 亚洲人亚洲人成电影网站色| 国产jizzjizz一区二区| 久久精品欧美日韩精品| 国产精品一区二区黑丝| wwwwww.欧美系列| 激情综合网av| 久久色.com| 国产黄色精品视频| 欧美韩国日本综合| 91亚洲精品乱码久久久久久蜜桃| 国产精品嫩草99a| 91天堂素人约啪| 亚洲裸体在线观看| 欧美在线制服丝袜| 亚洲电影在线播放| 91精品国产综合久久婷婷香蕉| 首页欧美精品中文字幕| 欧美一区二区啪啪| 日韩国产在线观看一区| 日韩亚洲欧美一区| 韩国av一区二区三区在线观看| 久久这里只精品最新地址| 国产成人亚洲综合a∨猫咪| 国产精品久久99| 91久久线看在观草草青青| 一区二区视频在线| 欧美日韩精品免费观看视频 | 亚洲欧美一区二区三区孕妇| 色8久久精品久久久久久蜜 | 综合久久久久综合| 欧美亚洲精品一区| 日韩一区精品字幕| 久久久青草青青国产亚洲免观| 国产成人亚洲综合a∨猫咪| 亚洲欧美一区二区久久| 7777精品伊人久久久大香线蕉超级流畅| 婷婷综合久久一区二区三区| 精品盗摄一区二区三区| 成人精品一区二区三区中文字幕|