[Notes] Linux system / bin / true and / bin / false

/bin/true

Linux system is carrying a program, which is fixed returns 0, and 0 is the true value bash syntax.

Corresponding to / bin / false value of zero is returned.

This is mainly used in shell scripts, programmers want a place to put the true value but a shell script but only accept commands place .

E.g:

while /bin/true; do
   sleep 20
done

  

Guess you like

Origin www.cnblogs.com/immortalBlog/p/11238093.html