[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] bash script problem
- Subject: [ale] bash script problem
- From: hooterpincher at gmail.com (Charles Shapiro)
- Date: Fri, 15 Dec 2006 14:43:59 -0500
- In-reply-to: <[email protected]>
- References: <1166207427.19125.7.camel@localhost> <[email protected]>
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...