[ale] bash script problem

Charles Shapiro hooterpincher at gmail.com
Fri Dec 15 14:43:59 EST 2006


Uuh, except I don't think "host" is gonna know the word "CMD".

-- CHS

On 12/15/06, ale list <ale at gurlhax0r.org> wrote:
>
>
>
> Jim Popovitch wrote:
> > Below is a small script
>
> Make it a shell function:
>
> #!/bin/sh
>
> function 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
>          CMD
>     else
>         ssh $host CMD
>     fi
> done
>
> --
> Tina
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list