List of Special Characters and Their Meanings

921阅读 0评论2012-06-04 initrdimg
分类:LINUX

List of Special Characters and Their Meanings
CharacterWhereMeaning
ESCcshFilename completion.
RETURNcsh, shExecute command.
spacecsh, shArgument separator.
TABcsh, shArgument separator.
TABbashFilename completion.
#csh, shStart a comment.
`csh, shCommand substitution (backquotes).
"csh, shWeak quotes.
'csh, shStrong quotes.
\csh, shSingle?character quote.
$varcsh, shVariable.
${var}csh, shSame as $var.
$var:modcshEdit var with modifier mod
${var?default}shIf var not set, use default.
${var=default}shIf var not set, set it to default and use that value.
${var+instead}shIf var set, use instead. Otherwise, null string.
${var?message}shIf var not set, print message (else default). If var set, use its value.
${var#pat}ksh, bashValue of var with smallest pat deleted from start.
${var##pat}ksh, bashValue of var with largest pat deleted from start.
${var%pat}ksh, bashValue of var with smallest pat deleted from end.
${var%%pat}ksh, bashValue of var with largest pat deleted from end.
|csh, shPipe standard output.
|&cshPipe standard output and standard error.
^shPipe character (obsolete).
^csh, bashEdit previous command line.
&csh, shRun program in background.
?csh, shMatch one character.
*csh, shMatch zero or more characters.
;csh, shCommand separator.
;;sh[/td]End of case statement.[/tr]
~csh, ksh, bashHome directory.
~usercsh, ksh, bashHome directory of user.
!csh, bashCommand history.
-ProgramsStart of optional argument.
-ProgramsRead standard input. (Only certain programs.)
$#csh, shNumber of arguments to script.
"$@"shOriginal arguments to script.
$*csh, shArguments to script.
$-shFlags set in shell.
$?shStatus of previous command.
$$csh, shProcess identification number.
$!shProcess identification number of last background job.
$<cshRead input from terminal.
cmd1 && cmd2csh, shExecute cmd2 if cmd1 succeeds.
cmd1 || cmd2csh, shExecute cmd2 if cmd1 succeeds.
$(..)ksh, bashCommand substitution.
((..))ksh, bashArithmetic evaluation.
\. fileshExecute commands from file in this shell.
:shEvaluate arguments, return true.
:shSeparate values in paths.
:cshVariable modifier.
[]csh, shMatch range of characters.
[]shTest.
%jobcsh, ksh, bashIdentify job number.
(cmd;cmd)csh, shRun cmd;cmd in a subshell.
{}csh, bashIn?line expansions.
{cmd;cmd;}shLike (cmd;cmd) without a subshell.
>filecsh, shRedirect standard output.
>>filecsh, shAppend standard output.
csh, shRedirect standard input.
<csh, shRead until word, do command and variable substitution.
<<\wordcsh, shRead until word, no substitution.
shRead until word, ignoring leading TABs.
>>! filecsh, shAppend to file, even if noclobber set and file doesn't exist.
>! filecshOutput to file, even if noclobber set and file exists.
>| fileksh, bashOutput to file, even if noclobber set and file exists.
>& filecshRedirect standard output and standard error to file.
m> fileshRedirect output file descriptor m to file.
m>> fileshAppend output file descriptor m to file.
m< fileshRedirect input file descriptor m from file.
<&mshTake standard input from file descriptor m.
<&?shClose standard input.
>&mshUse file descriptor m as standard output.
>&-shClose standard output.
m<&nshConnect input file descriptor n to file descriptor m.
m<&-shClose input file descriptor m.
n>&mshConnect output file descriptor n to file descriptor m.
m>&-shClose output file descriptor m.
上一篇:运维监控利器Nagios之:Nagios的日常维护和管理
下一篇:程序更新脚本备份