Search notes:

Shell command: [

[ is a regular executable (/usr/bin/[).
[ xxx ] is equivalent to test xxx.
[ can can be used, for example, in an if statement.

[[ … ]] vs [ … ]

In bash, [[ is a built-in.
Because [[ is a built-in, it allows to compare strings with < and >. With [ … ], < and > would be treated as file redirectors, hence a file would be (over-)written or tried to be read from a file.

See also

test
/usr/bin/[
Shell commands

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...', 1740462725, '3.139.81.238', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/shell/commands/square-bracket(56): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78