144

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

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
skeept
  • 12,077
  • 7
  • 41
  • 52

2 Answers2

194

You can use : for this.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • 6
    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) – ki9 Mar 09 '18 at 03:04
52

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
  • 222,467
  • 53
  • 283
  • 367