mirror of
https://github.com/balkian/gists.git
synced 2024-11-23 09:52:28 +00:00
Add 'repos/4322258/' from commit '0b2bff42ba422c022c293b59a6a9d43c0e23e5e1'
git-subtree-dir: repos/4322258 git-subtree-mainline:1ff85c6ab5
git-subtree-split:0b2bff42ba
This commit is contained in:
commit
6625e71312
15
repos/4322258/tar-and-scp.sh
Normal file
15
repos/4322258/tar-and-scp.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user