1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-24 18:32:27 +00:00
This commit is contained in:
Fernando Sánchez 2012-12-17 13:07:34 -08:00
commit ed3b93fb6f

15
example.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
tosend=""
for i in *.log; do
dir=$(echo $i | awk '{split($1,a,"_"); print a[1]}');
if [ ! -d $dir ]; then
mkdir $dir;
fi;
mv $i $dir;
tosend="$tosend\n$dir"
done
for i in $(echo -e $tosend | uniq);do
echo Compressing $i
tar -zcvf $i.tar.gz $i
scp $i.tar.gz user@server
done