diff -up swatchdog-3.2.4/swatchdog.more-cleanups swatchdog-3.2.4/swatchdog --- swatchdog-3.2.4/swatchdog.more-cleanups 2022-09-23 14:51:33.612588258 -0400 +++ swatchdog-3.2.4/swatchdog 2022-09-23 14:53:48.688268532 -0400 @@ -653,17 +653,19 @@ sub convert_command { my $varname = shift; my $command = shift; my @new_cmd = (); + my $i = my $n = my $m; - $command =~ s/\$[0*]/\$$varname/g if $awk_field_syntax; + $command =~ s/(? style field referencing. Included for backward -compatability. +compatibility. =item B<--config-file|-c> I @@ -1210,9 +1212,17 @@ Echo the matched line, and send a bell I =item B Execute I. The I may contain variables which are -substituted with fields from the matched line. A I<$N> will be replaced -by the I field in the line. A I<$0> or I<$*> will be replaced by the -entire line. +substituted with fields from the matched line. If the B<--awk-field-syntax> +command-line option has been specified, then each I<$N> will be replaced +by the I field in the line. If the option has not been specified, +then each I<$N> will refer to a backreference in the regular expression +used to match the line. + +A I<$0> or I<$*> will always be replaced by the entire line, unless they +have been escaped, regardless of the B<--awk-field-syntax> option. + +An escaped I<$N>, I<$0> or I<$*> may have unwanted effects since the value +will be determined by the shell used to execute the command. =item B