Bash program for getting files from /var/log/wtmp

Closed
Report
Posts
1
Registration date
Monday April 8, 2013
Status
Member
Last seen
April 8, 2013
-
Hi,
I am trying to write a script that will bring me the files from /var/log/wtmp from multiple servers into one file that I can manipulate. So far i tried this, but I am not able to see my wtmp files in this file. Please help!!!

dest=wtmp-user
mkdir -p /tmp/$dest/

for i in 192.168.1.{51..61};
do scp user@$i:/var/log/wtmp-* /tmp/$dest > /dev/null
done

bunzip2 /tmp/$dest/wtmp-*
cat /tmp/$dest/wtmp-* >> /tmp/$dest/asslast.data

Shouldnt this script bring all the /var/log/wtmp files and unzip them and put them in /tmp/$dest/asslast.data??? but it does not.. Please help!!!!