On 20 Apr 2021, at 7:09, Allie Crawford wrote:

archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' # Unix

Does anybody know what is “test” representing in this parameter configuration?

my_unix_prompt> man test

gives:
Tests the expression given and sets the exit status to 0 if true, and 1 if false. An expression is made up
          of one or more operators and their arguments.

In other words “test” here is a unix command which evaluated the expression supplied via the arguments.
Mostly used in its alternate form of “[ … ]” in shell scripts

Gavan Schneider
——
Gavan Schneider, Sodwalls, NSW, Australia
Explanations exist; they have existed for all time; there is always a well-known solution to every human problem — neat, plausible, and wrong.
— H. L. Mencken, 1920


Reply via email to