Search notes:

Bash: if

if evaluates a commands (CMD) exit status ($?). An exit status of 0 is considered true, all other status are considered false.
if CMD; then
   ...
   ...
fi
if CMD; then
   ...
   ...
else
   ...
   ...
fi
if CMD; then
   ...
   ...
elif CMD2; then
   ...
   ...
else
   ...
   ...
fi
CMD might be a square bracket command.

See also

bash
https://github.com/ReneNyffenegger/about-Bash/tree/master/conditional-constructs

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/sh...', 1740453495, '18.118.93.209', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/shell/bash/if(69): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78