Having a trouble understanding the problem with the following command:
Code:
comm -23 <(grep 'sshd.*Connection from\|Invalid' /var/log/sshd.log) $WKLOG > $TMPLOG
It runs fine from the command line (w/ filenames not variables) and when I execute the script myself, ./<script>, but when it runs from cron it chokes on this command. The stderr output is:
line 11: syntax error near unexpected token `('
line 11: comm -23 <(grep 'sshd.*Connection from\|Invalid' /var/log/sshd.log) $WKLOG > $TMPLOG
Any idea what's causing the change from command line to cron? Both are running as root.
Thanks for any help!