True, but the question is why would you do such a thing?
The answer is usually portability. If your script needs to ">file", that alone won't work everywhere and neither will "echo -n > file" or "echo "\c". That ": >file" will work.
---------- Post updated at 11:06 AM ---------- Previous update was at 09:30 AM ----------
Oh, and the other thing:
: ${nomeutente=�whoami�}
is because a bare
${nomeutente=�whoami�}
would try to execute the result. So if "whoami" is "ls", then "ls" would run. If it's "azrtyuw" it would also try to run and you'd get an error.
In this particular case you could just do
n=`whoami`
but consider
: ${nomeutente:=�whoami�}
(sets nomeutente only if not already set)
You'd need if-then or a case block otherwise which is much longer and possibly confusing.
Ahem, ... this is not entirely correct. In ksh there is a special operation for variables to give them values if they are not defined already:
variable=${variable:-"DEFAULT"}
This will set "$variable" to "DEFAULT" if it is not set and leave it unchanged, if it is already. Unlike the ": command ..."-construct this is entirely readable and can - even if someone doesn't know this - be found in every ksh man page.