Thursday 17 August 2017

Bash Null ":" (Colon) Operator

Cited from Using a Colon As A Bash Null Operator

":" is a do-nothing placeholder.

if [ "$A" = "1" ];
then
  :
else
  : > /temp/seldon
fi

No comments:

Post a Comment