[ale] bash script problem
Jim Popovitch
jimpop at yahoo.com
Fri Dec 15 17:03:54 EST 2006
On Fri, 2006-12-15 at 16:52 -0500, Charles Shapiro wrote:
> Okay, so you have all the pieces, right?
:-) Close. I had to change the single ticks to double quotes on
the /bin/bash line, but that did the trick. Uber cool everyone, THANKS
for all the help, ideas, etc.
-Jim P.
>
> #!/bin/sh
>
> CMD="if [ -e /var/lib/clamav/daily.cvd ]; then ls
> -al /var/lib/clamav/daily.cvd; else echo; fi"
>
> me=`hostname`
>
> for host in `cat ~/.hosts`; do
> echo -n "$host ";
> if [ $host = $me ]; then
> /bin/bash -c '$CMD'
> else
> ssh $host $CMD;
> fi
> done
More information about the Ale
mailing list