Is there a Bash equivalent to the Python's pass statement?
Asked
Active
Viewed 3.7k times
125
Jonathan Leffler
- 698,132
- 130
- 858
- 1,229
skeept
- 11,437
- 6
- 37
- 51
2 Answers
179
You can use : for this.
Ignacio Vazquez-Abrams
- 740,318
- 145
- 1,296
- 1,325
-
2More 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
-
59
-
2@Ignacio: I was struggling with the language there: Can "it fails at doing nothing" be interpreted as "it, erroneously, does something"? ...Probably I'm just scared by things like the subtle differences between "undefined" and "unspecified" in C++. – sth Mar 11 '10 at 00:37
-