What is the purpose of the : (colon) GNU Bash builtin?

前端 未结 12 858
梦如初夏
梦如初夏 2020-11-22 14:01

What is the purpose of a command that does nothing, being little more than a comment leader, but is actually a shell builtin in and of itself?

It\'s slower than inse

12条回答
  •  春和景丽
    2020-11-22 14:10

    It's similar to pass in Python.

    One use would be to stub out a function until it gets written:

    future_function () { :; }
    

提交回复
热议问题