How to use the pass keyword to ignore the process and complete the execution like Python in the linux shell

How to use the pass keyword to ignore the process and complete execution in the shell like Python

Problem background:

Sometimes when writing shell scripts, I want to temporarily not implement all the function content or conditional judgment content, but first occupy the space and then add it later to achieve the effect of the pass keyword in Python. I have given priority to testing whether the program can be executed sequentially, or testing a certain Part of the function, how to implement it?

Idea analysis:

Using colon: can be achieved

Method example:

if command

then

    :

else

    echo $i

fi

Use colon to ignore the effect and the program will continue to execute.

Guess you like

Origin blog.csdn.net/qq_35902025/article/details/130035753