125

Is there a Bash equivalent to the Python's pass statement?

Jonathan Leffler
  • 698,132
  • 130
  • 858
  • 1,229
skeept
  • 11,437
  • 6
  • 37
  • 51

2 Answers2

179

You can use : for this.

Ignacio Vazquez-Abrams
  • 740,318
  • 145
  • 1,296
  • 1,325
  • 2
    More info: [Stack Overflow: What is the purpose of the : (colon) GNU Bash builtin?](https://stackoverflow.com/questions/3224878/what-is-the-purpose-of-the-colon-gnu-bash-builtin) – Keith Mar 09 '18 at 03:04
45

true is a command that successfully does nothing.

(false would, in a way, be the opposite: it doesn't do anything, but claims that a failure occurred.)

sth
  • 211,504
  • 50
  • 270
  • 362