How the colon and semicolon differs in the following linux commands?
who am i:
who am i;
In this case it really doesn't matter much.
; is used to mark the end of a command in certain situations:
if [[ ... ]]; then ...; else ...; fi
who command, however, will produce the same output regardless of what the two words on the command line is. The
: is not special:
$ who am i $ who makes dinner $ who ano.L::e se=el
These will produce the exact same output.
So, to answer the question:
:is part of the word
i:and doesn't mean anything special here.