一个不做任何事情的命令,只是作为注释标记的存在,但实际上它本身是一个shell内置命令的目的是什么?
每次调用它比插入一个注释要慢大约40%,这可能会因注释的大小而有很大差异。我能想到的唯一可能的原因是:
# poor man's delay function
for ((x=0;x<100000;++x)) ; do : ; done
# inserting comments into string of commands
command ; command ; : we need a comment in here for some reason ; command
# an alias for `true'
while : ; do command ; done
我想我真正想知道的是它可能具有什么历史应用。