Is there a Bash equivalent to the Python's pass statement?
            Asked
            
        
        
            Active
            
        
            Viewed 4.5k times
        
    144
            
            
         
    
    
        Jonathan Leffler
        
- 730,956
- 141
- 904
- 1,278
 
    
    
        skeept
        
- 12,077
- 7
- 41
- 52
2 Answers
194
            You can use : for this.
 
    
    
        Ignacio Vazquez-Abrams
        
- 776,304
- 153
- 1,341
- 1,358
- 
                    6More 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
- 
                    62
- 
                    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
-