Shells
bash
The GNU Project's Bourne-Again Shell.
ksh
The Korn shell, either an original or clone, depending upon the operating system.
pdksh
The Public Domain Korn shell.
sh
The original Bourne shell, particularly on commercial Unix systems.
zsh
The Z-shell.
Built-in Commands
    .  
Read and execute a given file, in the current shell.
break
Break out of a for, select, until, or while loop.
cd
Change the current directory.
command
Bypass the search for functions to run a regular built-in command.
continue
Start the next iteration of a for, select, until, or while loop.
eval
Evaluate given text as a shell command.
exec
With no arguments, change the shell's open files. With arguments, replace the shell with another program.
exit
Exit a shell script, optionally with a specific exit code.
export
Export a variable into the environment of subsequent programs.
false
Do nothing, unsuccessfully. For use in shell loops.
getopts
Process command-line options.
read
Read lines of input into one or more shell variables.
readonly
Mark a variable as read-only; i.e., unchangeable.
return
Return a value from a shell function.
set
Print shell variables and values; set shell options; set the command-line parameters ($1, $2, ...).
shift
Move the command-line parameters down by one or more.
test
Evaluate expressions, which may be string-, numeric-, or file-attribute-related.
trap
Manage operating system signals.
true
Do nothing, successfully. For use in shell loops.
type
Indicate the nature of a command (keyword, built-in, external, etc.).
typeset
Declare variables and manage their type and attributes.
ulimit
Set or display various per-process system-imposed limits.
unset
Remove shell variables and functions.
Some Useful Commands
 
 
The following commands are useful in day-to-day shell scripting:
basename
Print the last component of a pathname, optionally removing a suffix. Mainly used in command substitution.
dirname
Print all but the last component of a pathname. Mainly used in command substitution.
env
Manipulate the environment of a command.
id
Print user and group ID and name information.
date
Print the current date and time, optionally under control of a user-supplied format string.
who
Print a list of logged-on users.
stty
Manipulate the state of the current terminal device.
Built-In Commands (Chinese)
    :  
傳回零結束值。
    .  
從檔案參數讀取和執行指令,然後再傳回。
break
自含括的 for、while 或 until 指令迴圈跳出 (如果有的話)。
cd
將現行目錄變更至指定的目錄。
continue
回復含括的 for、while 或 until 指令迴圈的下一個疊代。
echo
將字元字串寫入標準輸出。
eval
讀取引數作為 shell 的輸入,然後執行結果指令。
exec
執行 Argument 參數所指定的指令,而非此 shell 所指定的指令,但不建立新的處理程序。
exit
結束由 n 參數來指定結束狀態的 shell。
export
標記名稱以便自動匯出至後續執行指令的環境。
hash
尋找和記住指定的指令,其搜尋路徑中的位置。
pwd
顯示現行目錄。
read
從標準輸入讀取一行。
readonly
將 Name 參數所指定的名稱標示為唯讀。
return
使函數結束,並傳回指定的傳回值。
set
控制各不同參數在標準輸出的顯示。
shift
將指令行引數向左移位。
test
評估條件表示式。
times
顯示執行 shell 之處理程序的使用者和系統累計次數。
trap
當 shell 收到指定的信號時,執行指定的指令。
type
解譯 shell 會以何種方式將指定的名稱解譯為指令名稱。
ulimit
顯示或調整配置的 shell 資源。
umask
決定檔案的許可權。
unset
移除指定的名稱所對應的變數或函數。
wait
等待指定的子程序結束,或報告它的終止狀態。