The colon ":" command is a control command. it is occasionally used to simplify logical conditions, which is equivalent to a false alias. because it is built-in, it runs faster than true, but its readability is much worse. the reader may see it in a condition of the while loop. "while:" indicates that this is an infinite loop, which is equivalent to the more common "while true ". ":" It is also used for conditional setting of variables, for example, 1: $ {var: = value}. If no ":", shell will try to interpret $ var as a command. in some old shell script programs, you will publish a colon that is used at the beginning of a line to cause a comment, but modern script programs always start a comment line, this is because the execution efficiency is higher. 01 #! /Bin/sh02 03rm-f fred04 05if [-f fred]; then 06: 07 else 08 echo file fred did not exist09fi10 11 exit 0