Ana Sayfa / Linux / Bash Script / True, False and : commands

True, False and : commands

Infinite Loop

while true; do
 echo ok
done

or

while :; do
 echo ok
done

or

until false; do
 echo ok
done

Function Return

function positive() {
 return 0
}
function negative() {
 return 1
}

Code that will always/never be executed

if true; then
 echo Always executed
fi
if false; then
 echo Never executed
fi

Bunada Göz Atın

PHP Types

Type Comparison There are two types of comparison: loose comparison with == and strict comparison …

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir