shell :
示例一.(用作注释,占位)
#!/bin/bash : this is single line comment : 'this is a multiline comment, second line end of comments' if [ "1" == "1" ]; then echo "yes" else : fi
示例二 清空文件
[root@node56 ~]# cat <<<"Hello" >123.txt
[root@node56 ~]# cat 123.txt
Hello
[root@node56 ~]# : >123.txt
[root@node56 ~]# cat 123.txt
[root@node56 ~]#
示例三 参数扩展
[root@node56 ~]# : ${abc:=1234}
[root@node56 ~]# echo $abc
1234