Current location - Trademark Inquiry Complete Network - Futures platform - What is the meaning of ~ in linux shell if statement?
What is the meaning of ~ in linux shell if statement?
If is a judgment statement to judge whether something meets the set conditions.

1, in the format:

What if? Statement format

What if? situation

then

order

other

order

Fi, don't forget three conditional expressions ending in 2, if:

What if? Command? then

What if? Function? The then command is executed successfully, which is equal to returning 0? (such as grep? , find a match)? Failed to execute, returned non-0? (grep, no match found)

What if? [? expression_r_r_r? ]? If the result of then expression is true, it returns 0, and if leads the value of 0 to then.

What if? Testing? expression_r_r_r? If the result of the then expression is false, a non-zero value is returned, and if leads the non-zero value to then.