2007年5月30日星期三

shell 中冒号的用法

:

空命令[冒号]. 这个命令意思是空操作(即什么操作也不做). 它一般被认为是和shell的内建命令true是一样的。冒号":" 命令是Bash自身内建的, and its它的退出状态码是真(0)

 

same as "#" to put the comments or comment out the codes  .
advantage to use ": "  for multiple line comment out  .

: '
code1
code2
code3   
'

like C use "/* */" for comment out

 

: <<!
sas
sasa
!

 

Regards,

Tao

 

没有评论: