[ale] bash script problem

ale list ale at gurlhax0r.org
Fri Dec 15 17:22:43 EST 2006

Jim Popovitch wrote:
> On Fri, 2006-12-15 at 16:23 -0500, ale list wrote:
>> Charles Shapiro wrote:
>>> Uuh, except I don't think "host" is gonna know the word "CMD".
>> Try this, it appears to work. Note the double quotes around CMD in the 
>> ssh command:
> :-) That works for ssh, but the "if" error is back for the local system.
> Strange that #!/bin/sh (and even #!/bin/bash) doesn't work.
> Still, thanks for the suggestions.

Then I think I'd change it to this :)


CMD="if [ -e /var/lib/clamav/daily.cvd ]; then
     ls -al /var/lib/clamav/daily.cvd

for host in `cat ~/.hosts`; do
    echo -n "$host       ";
    ssh $host "$CMD"


More information about the Ale mailing list